Collapse All Expand All

.NET Framework Class Library
Members See Also

[TIBCO.EMS.UFOCLIENT .NET client library 6.0 documentation]

Asynchronously process an arriving message.

Namespace: TIBCO.EMS.UFO
Assembly: TIBCO.EMS.UFO (in TIBCO.EMS.UFO.dll)

# Syntax

    public interface IMessageListener

    Public Interface IMessageListener

    public interface class IMessageListener

# Remarks

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.

# See Also

IMessageListener Members
TIBCO.EMS.UFO Namespace