Salesforce

JMS Quick Send Message (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

JMS Quick Send Message (Magic xpa 3.x)

The JMS Quick Send Message program opens a message queue, sends a message, and then closes the message queue. This program provides the programmer with simplicity and saves overhead, but is not efficient when you want to send a large amount of messages.

This program calls the Open Queue, Message Setup, Send Message, or Close Queue programs accordingly.

The parameters and return value for the JMS Quick Send Message program are:

Parameter

Description

Connection Factory

Alpha (250). Input. The name of the Queue Connection Factory.

Queue Name

Alpha (250). The name of the queue or topic.

Username

Alpha (25). Optional. The username used for connection.

Password

Alpha (25). Optional. The password used for connection.

Acknowledgement mode

Numeric (1). The valid values are:

  1. 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.

  2. CLIENT_ACKNOWLEDGE: The client acknowledges a consumed message by calling the message's acknowledge method.

  3. DUPS_OK_ACKNOWLEDGE: This mode instructs the session to acknowledge message delivery.

JMS Message Type

Alpha (1). The valid values are:

  • T: Text message. A Java language string object, such as the contents of an XML file.

  • B: Bytes message. A stream of uninterpreted bytes, such as a BLOB.

  • M: Map message. A set of name or value pairs, with string object names and primitive type values in the Java programming language. The order of the entries is irrelevant. See also Buffer Table.

  • S: Stream message. A stream of Java defined primitive values. The supported primitive data types are: Boolean, Byte, Short, Char, Int, Long, Float, Double, String, Byte Array. The order of the data is important. See also Buffer Table.

  • O: Object message. A Java serializable object.

  • H: Header message. This message type only contains header fields and properties, and is useful when no message body is required.

Message

BLOB input, containing the message data. If the Message type is Map message or Stream message, the Message BLOB must contain the memory table described in the Buffer Table topic.

JMS.TimeToLive

Numeric (9). The life span of a message in milliseconds. The default, 0, is unlimited.

JMS.Priority

Numeric (1). The message priority can range from 0, the lowest priority, to 9, the highest priority. The default is 4.

JMS.DeliveryMode

Numeric (1). Persistence. The valid values are:

1: Non-persistent. If the provider fails, the message may be lost.

2: Persistent. The message will not be lost. This is the default.

JMS.Type

Alpha (200). For use in message filtering. Setting this for a Send operation causes the receiver that requested only certain messages to filter messages. For example, if the Open message was started with the Selector option of JMSType = ‘Magic’ and this parameter was not set with JMS, then this message will not be read. However, if this parameter was set with Magic, it will be received.

Setup string

Alpha (2000). This is for the selector’s StringProperty. The properties work in pairs and are separated by the delimiter provided in the next parameter. For example, if you want to set a property called Sender and give it the value Magic, the setup string would be Sender!Magic if ! was the delimiter. The selector option, which is part of JMS’s filtering system, would be Sender = ‘Magic’. Multiple properties can be set up.

Delimiter

Alpha (5). The delimiter for the StringProperty string.

Correlation Id

Alpha (200). (Input optional). For Send / Reply implementations.

Message Id

Alpha (200). (Output). This is the Message Id as returned by JMS.


Return value

Numeric: 0 for success and a negative value for failure.

Reference
Attachment 
Attachment