Description:

Consumes JMS Message of type BytesMessage or TextMessage transforming its content to a FlowFile and transitioning it to ‘success’ relationship.

Tags:

jms, get, message, receive, consume

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 (e.g., 'topic://myTopic').
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</br> Implementation:
JMSConnectionFactoryProvider
The Controller Service that is used to obtain ConnectionFactory

Relationships:

Name Description
success All FlowFiles that are received from the JMS Destination are routed to this relationship

Reads Attributes:

None specified.

Writes Attributes:

None specified.

See Also:

PublishJMS

JMSConnectionFactoryProvider

Summary:

This processor consumes messages from JMS compliant messaging system and converts them to a FlowFile to be routed to the next component in the flow.

This processor does two things. It constructs FlowFile by extracting information from the consumed JMS message including body, standard [JMS Headers](http://docs.spring.io/spring-integration/api/org/springframework/integration/jms/JmsHeaders.html# “”) and Properties. The message body is written to a FlowFile while standard JMS Headers and Properties are set as FlowFile attributes.

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 ConsumeJMS:

  1. User Name - [OPTIONAL] User Name used for authentication and authorization when this processor obtainsjavax.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 (e.g., ‘topic://myTopic’).

  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.