AMQPSendMessage

You can use the AMQPSendMessage activity to send messages to a specified destination.

General

The following table describes the configurations in the General tab of the AMQPSendMessage activity.

Field Module Property? Description
Name No The name of the activity displayed in the process. The default value is AMQPSendMessage.
Connection Yes Click to select an AMQP Connection shared resource. The AMQP Connection shared resource creates a connection between the plug-in and an AMQP server.

If no matching AMQP Connection shared resources are found, click Create Shared Resource to create one. See Creating an AMQP Connection for more details.

Protocol Version No Select the AMQP protocol version. For this release, AMQP protocol 1.0 (AMQP-1-0) is supported with Qpid-1-0 or ActiveMQ-1-0 broker; and AMQP protocol 0.9 (AMQP-0-9) is supported with RabbitMQ-0-9 broker.

The default value is AMQP-1-0.

Queue Name Yes Enter the queue name to which the message is published.
Note: This field is unavailable when RabbitMQ-0-9 is selected from the BrokerType list of the used AMQP Connection shared resource.
Exchange Type No The type of the exchange. The valid types are listed as follows:
  • direct
  • topic
  • fanout
  • headers
Note: This field is only available when RabbitMQ-0-9 is selected from the BrokerType list of the used AMQP Connection shared resource.
Exchange Name Yes The name of the exchange.
Note: This field is only available when RabbitMQ-0-9 is selected from the BrokerType list of the used AMQP Connection shared resource.
Routing Key Yes The routing key of the exchange. This field is only required when direct or topic is selected as the exchange type.
Note: This field is only available when RabbitMQ-0-9 is selected from the BrokerType list of the used AMQP Connection shared resource.
Message Type No Select one of the following message types:
  • TextMessage: the message is in the string format.
  • BytesMessage: the message is in the byte stream format.
  • Simple: the message does not have message body.
User Properties No Right-click inside the User Properties text box and click the Add Parameter icon to add a user property. To delete a user property, click the Delete icon.
Specify the following fields in this text box:
  • name (a String value): the name of the user property.
  • type: the property data type. The valid data types include String, Number, Boolean.
  • value (a String value): the value of the user property.
    Note: If the property data type is Boolean, any other value except for true or True or TRUE is considered false.

Description

In the Description tab, you can add a short description for the AMQPSendMessage activity.

Advanced

The following table describes the configurations in the Advanced tab of the AMQPSendMessage activity.

Field Module Property? Description
Delivery Mode No Select one of the following delivery modes:
  • Persistent: the messages are stored before forwarding.
  • Non-Persistent: the messages are not stored before forwarding. If the transmission failed, the messages might be lost.
Expiration(msec) No Corresponds to the Expiration property that specifies how long the message remains active (in milliseconds). The default value is 0, which means the message remains active permanently.
Priority No Specifies the priority of the message. The value ranges from 0 to 9.

The default value is 4.

Type Yes Specifies the event type or command type this message represents.

Input

The following table describes the input elements in the Input tab of the AMQPSendMessage activity.

Note: The values entered in the following fields must be entered in single quotation marks (' '), or double quotation marks (" ").
Input Item Data Type Description
name String Enter the name of the user property.
Note: The value entered in this field overwrites the value entered in the User Properties field of the General tab.
type String Enter one of the following types for the user property:
  • Boolean
  • Number
  • String

The value entered in this field overwrites the value entered in the User Properties field of the General tab.

value String Enter the value of the user property.

The value entered in this field overwrites the value entered in the User Properties field of the General tab.

deliveryMode String Right-click this element and click Enumerations to select one of the following delivery modes for the message, or enter the value in this field:
  • Persistent

    The message is stored and forwarded.

  • Non-Persistent

    The message is not stored and might be lost due to transmission failure.

The value entered in this field overwrites the item selected from the Delivery Mode list of the Advanced tab.

messageID String Enter the message ID for the message, such as "ID:1234567891A".

If you leave this field blank, a random message ID is given.

expiration Integer Enter the expiration value of the message.

The value entered in this field overwrites the value entered in the Expiration(msec) field of the Advanced tab.

priority Integer Enter the priority level for sending the message.

The value entered in this field overwrites the value entered in the Priority field of the Advanced tab.

type String Enter the type for the message.

The value entered in this field overwrites the value entered in the Type field of the Advanced tab.

body String/Byte The message body of the received message:
  • If TextMessage is selected from the Message Type list of the General tab, the message is in the String format.
  • If BytesMessage is selected from the Message Type list of the General tab, the message is in the String format.
Note: If Simple is selected from the Message Type list of the General tab, the body field is unavailable.

Output

The following table describes the output elements in the Output tab of the AMQPSendMessage activity.

Output Item Data Type Description
sendResult Boolean The result after sending the message. If the message is successfully sent, the value is true.

Fault

The following table describes the error schema elements in the Fault tab of the AMQPSendMessage activity.

Error Schema Element Description
AMQPPluginException This error message is displayed when the plug-in captures any exception related to the process of sending a message to an AMQP broker.
AMQPConnectionException This error message is displayed when any exception occurs about the connection problem that is in the process of sending a message to an AMQP broker.