Response Route AMQP


images/download/thumbnails/55940304/arrow_up.png Introduction: You can find a description of this phase in section Phase 6 (Introduction).


images/download/thumbnails/55940304/image2020-3-19_15-4-40.png

images/download/attachments/55940304/665.png


Note: See also section File Names, File Patterns, Paths, System Constants and Variables.

(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. 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. Note: See https://www.rabbitmq.com/getstarted.html, for example.


images/download/attachments/55940304/666.png


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


images/download/attachments/55940304/625.png images/download/attachments/55940304/629.png


(7) Set this checkbox if (3) is a durable queue (such a queue will survive a broker restart). See also section AMQP Connection. Note: Does not apply to type RPC.

(8) The routing key is a message attribute that the server uses to decide how the message should be routed to queues. For details please refer to the documentation of the AMQP server used, e.g. here for RabbitMQ. Note: Does not apply to type Publish .

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 0.9.1


If you are using AMQP 0.9.1, only certain message properties can be set with the following system variables.


AMQP_091BASIC_CONTENT_TYPE
AMQP_091BASIC_CONTENT_ENCODING
AMQP_091BASIC_MESSAGE_ID
AMQP_091BASIC_TIMESTAMP
AMQP_091BASIC_EXPIRATION
AMQP_091BASIC_APP_ID
AMQP_091BASIC_USER_ID
AMQP_091BASIC_TYPE
AMQP_091BASIC_PRIORITY
AMQP_091BASIC_CORRELATION_ID

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

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.

Body Type


See system variable AMQP_SYS_BodyType.

Input Agent


See section AMQP (Input Agent).