JMS sender

1. Overview

JMS sender is used to send the message to a JMS destination. This destination can be a queue or a topic in a JMS environment. The connection factory determines which JMS environment is used. By default the connection factory named in property connect.connectionfactory.name in connectplaza-agent.properties is used, which is activeMQFactory, the built-in ActiveMQ broker of the agent. If another connection factory is needed, the attribute Connection Factory has to be used.

REMEMBER: You cannot use a JMS Sender when you are using an HTTP Listener. If you are using an HTTP Listener, you have to use a Message Reply to let the HTTP Listener know the job is done. So if that is the case, use the JMS Outbound gateway in services.

If no queue name, topic name or header is set, the JMSReplyTo (jms_replyTo) property is used as destination. This property is normally set by a JMS listener.

The output of the producer is a JMS Message.

2. Headers

Since 5.3.1 the headers of the ConnectMessage are sent as JMS properties, so a listener that receives the message gets them again. Before, only the message content was sent. Only headers with a text, number or boolean value and a name that is valid as a JMS property name are sent; other headers are dropped. The headers jms_replyTo and jms_correlationId are sent as the reply-to and correlation id of the JMS message. The internal headers that a JMS listener adds for acknowledgement are not sent.

3. Persistent Delivery

Persistent Delivery is switched on by default. The broker keeps a persistent message when it restarts. Switch it off only if losing messages when the broker restarts is acceptable: a non-persistent message is faster to send. The JMS outbound gateway has the same setting.

Persistent Delivery takes effect since 5.3.1. Before, the setting had no effect and messages were always sent as persistent. In earlier versions the default of the setting was false (verified for the JMS Sender in 5.3.0, and for the JMS outbound gateway in 5.2.1 and 5.3.0; the JMS Sender did not have the setting in 5.2.1). A JMS Sender or JMS outbound gateway that was saved with those versions can still contain false, and then sends non-persistent messages after the update to 5.3.1. After updating, open the JMS Senders that were saved since 5.3.0 and the JMS outbound gateways saved in any earlier version, and check that Persistent Delivery has the value you want.

4. Having selected QUEUE topology

In the table below, you will find an explanation of these properties.

All attributes with a * are mandatory.

All attributes with a '*' , require at least one of these properties having been set.

The JMS sender properties with queue topology
Attribute Description

Name*

By default, we fill this out with the technical tag, followed by a serial number. Changing the name is optional.

Enabled

Set this value to true, if you want this producer to be enabled.

JMS Topology

Specify which type of JMS topology you want to use. You can choose between QUEUE and TOPIC. The default is QUEUE.

Queue Name***

Name of queue to send to. Only one of Queue Name and Queue Header can be set.

Queue Header

Name of the header that contains the queue name to send to. Only one of Queue Name and Queue Header can be set.

MessagePart

Name of the MessagePart in a ConnectMessage where the content of the file is being stored.

Persistent Delivery

Specify whether the message is sent as a persistent message. The default is true. See Persistent Delivery.

Connection Factory

Name of the connection factory to use. The default jmsConnectionFactory uses the factory named in property connect.connectionfactory.name in connectplaza-agent.properties, by default activeMQFactory.

Description

Description of the specific producer. This is for documentation purposes.

5. Having selected TOPIC topology

The JMS sender properties with topic topology
Attribute Description

Name*

By default, we fill this out with the technical tag, followed by a serial number. Changing the name is optional.

Enabled

Set this value to true, if you want this producer to be enabled.

JMS Topology

Specify which type of JMS topology you want to use. You can choose between QUEUE and TOPIC. The default is QUEUE.

Topic Name***

Name of topic to send to. Only one of Topic Name and Topic Header can be set.

Topic Header

Name of the header that contains the Topic name to send to. Only one of Topic Name and Topic Header can be set.

MessagePart

Name of the MessagePart in a ConnectMessage where the content of the file is being stored.

Persistent Delivery

Specify whether the message is sent as a persistent message. The default is true. See Persistent Delivery.

Connection Factory

Name of the connection factory to use. The default jmsConnectionFactory uses the factory named in property connect.connectionfactory.name in connectplaza-agent.properties, by default activeMQFactory.

Description

Description of the specific producer. This is for documentation purposes.