Sun GlassFish Message Queue 4.4 Developer's Guide for C Clients

Parameters

sessionHandle

The handle to the session to which this consumer belongs. The client runtime specifies this handle when it calls your message listener.

consumerHandle

A handle to the consumer receiving the message. The client runtime specifies this handle when it calls your message listener.

messageHandle

A handle to the incoming message. The client runtime specifies this handle when it calls your message listener.

callbackData

The void pointer that you passed to the function MQCreateAsyncMessageConsumer or the function MQCreateAsyncDurableMessageConsumer.

The body of a message listener function is written by the receiving client. Mainly, the function needs to process the incoming message by examining its header, body, and properties. The client is also responsible for freeing the message handle (either from within the handler or from outside the handler) by calling MQFreeMessage.

In addition, you should observe the following guidelines when writing the message listener function: