Response Route AMQP/JMS
Introduction: Phase 6.
Lobster_data provides an interface for AMQP servers (Advanced Message Queuing Protocol). This Response Route is used to send data to this interface. Important note: This Response Route can also be used to send to JMS server queues.
(1) Selection of an AMQP 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. A corresponding input field appears if you select type RPC. The reason is that an RPC call generates a response and this response is processed by the subsequent profile. See also section AMQP Networks with Style RPC.
(3) Name of the queue to send to or the topic. See https://www.rabbitmq.com/getstarted.html.
(4) Set this checkbox if (3) is a durable queue (such a queue will survive a broker restart).
AMQP 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_Year you can set the message property Year.
AMQP Message Headers
If you are using AMQP 1.0, you can set message headers with system variables of the form AMQP_SYS_<name of the header> (upper and lower case in the header is considered).
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.