Description:

Creates a JMS Message from the contents of a FlowFile and sends it to a JMS Destination (queue or topic) as JMS BytesMessage.

Tags:

jms, put, message, send, publish

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property is considered “sensitive”, meaning that its value will be encrypted. Before entering a value in a sensitive property, ensure that the nifi.properties file has an entry for the property nifi.sensitive.props.key.

Name Default Value Allowable Values Description
User Name User Name used for authentication and authorization.
Password Password used for authentication and authorization.
Sensitive Property: true
Destination Name The name of the JMS Destination. Usually provided by the administrator.
Destination Type QUEUE * QUEUE
* TOPIC
The type of the JMS Destination. Could be one of 'QUEUE' or 'TOPIC'. Usually provided by the administrator. Defaults to 'TOPIC
Session Cache size* 1 The maximum limit for the number of cached Sessions.
Connection Factory Service Controller Service API:
JMSConnectionFactoryProviderDefinition
Implementation:
JMSConnectionFactoryProvider
The Controller Service that is used to obtain ConnectionFactory

Relationships:

Name Description
failure All FlowFiles that cannot be sent to JMS destination are routed to this relationship
success All FlowFiles that are sent to the JMS destination are routed to this relationship

Reads Attributes:

None specified.

Writes Attributes:

None specified.

See Also:

ConsumeJMS, JMSConnectionFactoryProvider

Summary

This processor publishes the contents of the incoming FlowFile to a JMS compliant messaging system.

This processor does two things. It constructs JMS Message by extracting FlowFile contents (both body and attributes). Once message is constructed it is sent to a pre-configured JMS Destination. Standard JMS Headers will be extracted from the FlowFile and set on javax.jms.Message as JMS headers while other FlowFile attributes will be set as properties of javax.jms.Message. Upon success the incoming FlowFile is transfered to the success Relationship and upon failure FlowFile is penalized and transfered to the failure Relationship.

Configuration Details

At the time of writing this document it only defines the essential configuration properties which are suitable for most cases. Other properties will be defined later as this component progresses. Configuring PublishJMS:

  1. User Name - [OPTIONAL] User Name used for authentication and authorization when this processor obtains javax.jms.Connection from the pre-configured javax.jms.ConnectionFactory (see below).

  2. Password - [OPTIONAL] Password used in conjunction with User Name.

  3. Destination Name - [REQUIRED] the name of the javax.jms.Destination. Usually provided by administrator.

  4. Destination Type - [OPTIONAL] the type of the javax.jms.Destination. Could be one of ‘QUEUE’ or ‘TOPIC’ Usually provided by the administrator. Defaults to ‘TOPIC’.

  5. Session Cache size - [OPTIONAL] Specify the desired size for the JMS Session cache (per JMS Session type). This cache size is the maximum limit for the number of cached Sessions. Usually provided by the administrator (e.g., ‘2453’). Defaults to ‘1’.

  6. Connection Factory Service - [REQUIRED] link to a pre-configured instance of org.apache.nifi.jms.cf.JMSConnectionFactoryProvider.