TIBCO EMS .NET API 8.5 TIBCO EMS .NET API 8.5

- Main Page
- Related Pages
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
TIBCO.EMS.UFO.IMessageListener Interface Reference

Asynchronously process an arriving message. More...

## Public Member Functions
void | OnMessage (Message message)
| Passes a message to the message listener More...

## Detailed Description

Asynchronously process an arriving message.

This interface provides an asynchronous pathway for receiving messages. In order to receive messages asynchronously, a client implements this interface and calls setMessageListener to register the message listener with a MessageConsumer. When a message arrives, the client library calls the listener's onMessage method with the message as its argument.

Each session insures that it passes messages serially to the listener. This means that a listener assigned to one or more consumers of the same session can assume that the onMessage method is not called with the next message until the session has completed the last call

IMessageListener mimics the way in which JMS receives messages in a Java programming idiom. In contrast, EMSMessageHandler provides similar functionality in a .NET idiom. Programmers may select either idiom but not both (which would cause duplicate message processing, with undefined behavior).

Deprecated

In earlier releases, clients could register listeners with sessions as well as consumers. This practice is now deprecated - we recommend migrating existing code to one of these two practices:

- Java Idiom Register listeners with consumers.
- .NET Idiom Register EMSMessageHandler delegates with consumers.

## Member Function Documentation

void TIBCO.EMS.UFO.IMessageListener.OnMessage | ( | Message | message | ) |

Passes a message to the message listener

Parameters

  message | The message to be passed to the message listener