An application uses a message consumer to receive messages sent to a destination.
For a list of the XMS defined properties of a MessageConsumer object, see Properties of MessageConsumer.
Function | Description |
---|---|
xmsMsgConsumerClose | Close the message consumer. |
xmsMsgConsumerGetMessageListener | Get pointers to the message listener function and context data that are registered with the message consumer. |
xmsMsgConsumerGetMessageSelector | Get the message selector for the message consumer. |
xmsMsgConsumerReceive | Receive the next message for the message consumer. The call waits indefinitely for a message, or until the message consumer is closed. |
xmsMsgConsumerReceiveNoWait | Receive the next message for the message consumer if one is available immediately. |
xmsMsgConsumerReceiveWithWait | Receive the next message for the message consumer. The call waits only a specified period of time for a message, or until the message consumer is closed. |
xmsMsgConsumerSetMessageListener | Register a message listener function and context data with the message consumer. |
xmsRC xmsMsgConsumerClose(xmsHMsgConsumer *consumer, xmsHErrorBlock errorBlock);
If an application tries to close a message consumer that is already closed, the call is ignored.
xmsRC xmsMsgConsumerGetMessageListener(xmsHMsgConsumer consumer, fpXMS_MESSAGE_CALLBACK *lsr, xmsCONTEXT *context, xmsHErrorBlock errorBlock);
Get pointers to the message listener function and context data that are registered with the message consumer.
For more information about using message listener functions, see Using message listener functions in C.
xmsRC xmsMsgConsumerGetMessageSelector(xmsHMsgConsumer consumer, xmsCHAR *messageSelector, xmsINT length, xmsINT *actualLength, xmsHErrorBlock errorBlock);
Get the message selector for the message consumer.
For more information about how to use this function, see C functions that return a string by value.
xmsRC xmsMsgConsumerReceive(xmsHMsgConsumer consumer, xmsHMsg *message, xmsHErrorBlock errorBlock);
Receive the next message for the message consumer. The call waits indefinitely for a message, or until the message consumer is closed.
xmsRC xmsMsgConsumerReceiveNoWait(xmsHMsgConsumer consumer, xmsHMsg *message, xmsHErrorBlock errorBlock);
Receive the next message for the message consumer if one is available immediately.
xmsRC xmsMsgConsumerReceiveWithWait(xmsHMsgConsumer consumer, xmsLONG waitInterval, xmsHMsg *message, xmsHErrorBlock errorBlock);
Receive the next message for the message consumer. The call waits only a specified period of time for a message, or until the message consumer is closed.
xmsRC xmsMsgConsumerSetMessageListener(xmsHMsgConsumer consumer, fpXMS_MESSAGE_CALLBACK lsr, xmsCONTEXT context, xmsHErrorBlock errorBlock);
Register a message listener function and context data with the message consumer.
For more information about using message listener functions, see Using message listener functions in C.