tibemsSession_CreateConsumer

Function

Purpose

Create a message consumer.

C Declaration

tibems_status tibemsSession_CreateConsumer(
    tibemsSession session,
    tibemsMsgConsumer* consumer,
    tibemsDestination destination,
    const char* messageSelector,
    tibems_bool noLocal );

COBOL Call

CALL "tibemsSession_CreateConsumer"
     USING BY VALUE session,
           BY REFERENCE consumer,
           BY VALUE destination,
           BY REFERENCE messageSelector,
           BY VALUE noLocal,
           RETURNING tibems-status
END-CALL.
Note: session, consumer and destination have usage pointer.

Parameters

Parameter Description
session Create the consumer in this session.
consumer The function stores the new consumer object in this location.
destination Create a consumer for this destination. The argument may be any destination (queue or topic).
messageSelector When non-null, the server filters messages using this selector, so the consumer receives only matching messages; see Message Selectors.

When null, or the empty string, the consumer receives messages without filtering.

noLocal When true, the server filters messages so the consumer does not receive messages that originate locally—that is, messages sent through the same connection.

When false, the consumer receives messages with local origin.