Response Route JMS
Introduction: You can find a description of this phase in section Phase 6 (Introduction).
Note: See also section File Names, File Patterns, Paths, System Constants and Variables.
(1) Selection of a JMS alias.
(2) Selection of the type (Publish, Routing, Topic or RPC). The type RPC is synchronous, the others are asynchronous. Note: If you are using style RPC, you have to specify a subsequent profile, see (4). The reason is that an RPC call generates a response and this response is processed by the subsequent profile.
(3) Name of the queue or the topic to send to. Important note: With newer versions of ActiveMQ you might have to use the prefix dynamicQueues/ (respectively dynamicTopics/), e.g. dynamicQueues/JMSSendQueue. Please adjust these names in configuration file ./etc/message.xml. See 'dynamic contexts' in ActiveMQ for more details.
(4) If you have selected type RPC in (2), you must specify a subsequent profile here. The profile must be active and have an Input Agent of type Message.
(5) Specifies the time in seconds the sending and processing of a message are allowed to take.
With a synchronous message, the profile waits until the target profile has finished processing (successfully or with errors). If the time set here is exceeded, this Response Route terminates with an error, although the target profile may eventually finish successfully.
In the case of an asynchronous or persistent message, the profile does not wait for the target profile, but the Response Route ends successfully after the data has been transferred. The message itself has a finite lifetime. If it could not be accepted by the target profile after this time, it will be deleted. The time set here is the maximum lifetime of the message. Note: The minimum lifetime is 12 hours (regardless of the set value).
(6) There are three different types of messages.
Synchronous. The profile sends the message and does not continue until the response has been received.
Asynchronous. The profile sends the message and continues immediately. The response is irrelevant for the further profile execution.
Persistent. Works almost like Asynchronous. Additionally, however, if the remote system cannot be reached, the message will be stored and the Lobster_data tries to resend the message every 50 ms. If the message could not be delivered after a maximum time (5), it is lost.
JMS Message Properties
To set a message property, you have to define a system variable of the form AMQP_<name of the message property (upper and lower case in the property is considered). Example: With the variable AMQP_TTL you can set the message property TTL.
JMS Message Headers
You can use the following system variables to set JMS Message Headers:
System variable AMQP_JMS_CORRELATIONID (for JMS Message Header JMSCorrelationID).
AMQP_JMS_EXPIRATION (JMSExpiration).
AMQP_JMS_PRIORITY (JMSPriority).
AMQP_JMS_REPLYTO (JMSReplyTo).
AMQP_TTL (JMSTimeToLive).
AMQP_TYPE (JMSType).
JMS Message Selectors
Section Input Agent AMQP/JMS describes how to filter messages with JMS message selectors. Now suppose you want to work with a selector Year=2019. Create a system variable AMQP_Year of type Integer and value 2019 in the profile. If you now send a JMS message here in the Response Route, it contains the message custom property Year with value 2019 and will be found with your message selector.
Message Type
By default, the Response Route AMQP/JMS transfers data to the receiving server as byte message. To change this, since some servers cannot cope with this, the system variable AMQP_JMS_TEXTMESSAGE can be created in the profile with value true. The data will then be transferred as text message. In addition, the encoding in the Response Route must be set to UTF-8.