Collapse All Expand All

.NET Framework Class Library
MessageConsumer Class See Also

[TIBCO.EMS .NET client library 6.0 documentation]

Get and set the asynchronous message listener

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

# Syntax

    public IMessageListener MessageListener { get; set; }

    Public Property MessageListener As IMessageListener

    public:
    property IMessageListener^ MessageListener {
    	IMessageListener^ get ();
    	void set (IMessageListener^ value);
    }

# Remarks

The client implements the MessageListener interface and registers a MessageListener object by setting this property. When a message arrives, the client library calls this MessageListener’s onMessage method with the message as its argument.

A client can use either MessageHandler or MessageListener to handle asynchronous message consumptions, but not both. Setting up both will cause the message to be handled more than once which can result in undefined behavior.

# Exceptions

Exception | Condition
--- | ---
TIBCO.EMS..::.IllegalStateException | If the consumer is closed

# See Also

MessageConsumer Class
TIBCO.EMS Namespace