ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

DataQueueListener not working/called when data is written to a DATA QUEUE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DataQueueListener not working/called when data is written to a DATA QUEUE

    We are testing if the listener concept works on DATA QUEUE on iSeries.

    There are two different program one writing to the DATA QUEUE and other is listening for any changes to the DATA QUEUE. Below are the observations so far.

    1. The Data queue description matches between listener and writer, so that implies both are referring same Data queue.

    2. When peeked from listener it reads off same data queue as the writer is writing confirmed by comparing the text as they match.

    3. If data is written to the data queue in the listener program itself then events are fired as expected

    4. BUT as expected when data is written by the writer program the written method in the listener is NOT called/triggered. The listener is registered using the addDataQueueListener method on DATA QUEUE.

    Is there something missing here? As it is a normal scenario where the writer and reader can be totally unrelated/different most of the time.

  • #2
    Re: DataQueueListener not working/called when data is written to a DATA QUEUE

    Have you tried peeking from the writer side when the listener is writing?

    When the listener listens as the writer is writing then the listener hears what the writer has written, but only if it peeks, not when it listens.

    Very puzzling.

    Is the listener listening to the referenced written dataqueue, or is the listener listening for writing actions performed by its own instantiated object?

    Comment

    Working...
    X