Listener scenario overview

These are listener scenario examples that demonstrate the flow of calls for input events.

To determine the model that best fits the requirements of the resource, follow these examples to understand the flow of calls for input events as they summarize the available alternatives.

  • Adapters Process Similar Events
  • Resource Manager Processes Similar Events
  • Listener and Map Connection Threads are Combined
The meaning of the following similar events is that the connection is identical in both cases, but the event itself might differ. For example, consider:
“QueueName = fred, MessageID = 100”
and
“QueueName = fred, MessageID = 200”

If the API for the resource allows the Message ID to be provided to a Get call, such that only the message with the specified Message I is returned, it is probably easiest to create multiple threads, one getting messages with ID 100; the other messages with ID 200. This is the model used in the Resource Manager Processes Similar Events example.

However, if the API cannot do this selection or it is not possible to have multiple connections to the same resource, the adapter must handle the filtering of messages itself. In the latter scenario, a single Listen method will have to handle multiple events.