JMS Open Destination (Magic xpa 3.x)
The JMS Open Destination program opens a messaging queue and returns a numeric reference for the queue that is used for all other programs. The parameters and return value for the JMS Open Destination program are:
|
|
Connection Factory Name
|
Alpha (500). Input. The name of the JMS Connection Factory. This is either the Queue Connection Factory name for a Queue or the Topic Connection Factory name for a topic.
|
Queue Name
|
Alpha (500). The name of the queue or topic.
|
User name
|
Alpha (25). Optional. The username used for connection.
|
Password
|
Alpha (25). Optional. The password used for connection.
|
Transacted Operations
|
Logical (5). Determines whether or not the session is under a transaction. The Begin Transaction is automatic.
|
AcknowledgeMode
|
Numeric (1). The valid values are:
-
AUTO_ACKNOWLEDGE: The session automatically acknowledges a client's receipt of a message, either when the session has successfully returned from a call to receive or when the session message listener’s call to process the message returns successfully.
-
CLIENT_ACKNOWLEDGE: The client acknowledges a consumed message by calling the message's acknowledge method.
-
DUPS_OK_ACKNOWLEDGE: This mode instructs the session to acknowledge message delivery.
|
Message selector
|
Alpha (2000). Optional. Can send a Message Selector string that defines which messages to receive. More information can be found in the JMS API documentation.
Example: JMSType = ‘Magic’
Note: You cannot check the Message Selector string, but if the string is not valid, JMS returns an error.
|
Topic ?
|
Logical (5). Defines whether the Open operation is for a queue or topic.
|
Durable Subscription ?
|
Logical (5). Defines whether or not the subscription is a durable subscription.
|
Durable subscription name
|
Alpha (250). The name of the durable subscription. This parameter is mandatory for durable subscriptions.
|
Publish/Subscribe Options
|
Alpha (1). Defines the timing of the Subscriber. This parameter is mandatory for a topic. The valid values are:
-
P: Publish, which means that a subscriber will only be started if needed.
-
S: Subscriber, which means that a subscriber is started during the Open operation, and that messages can still be published.
|
Return value
|
Numeric (15). When the connection is successful, the queue handle is returned. When the connection is not successful, a negative value is returned and an error is entered in the Error Log.
|