ConsumeJMS

Description:

Consumes JMS Message of type BytesMessage or TextMessage transforming its content to a FlowFile and transitioning it to 'success' relationship. JMS attributes such as headers and properties will be copied as FlowFile attributes.

Additional Details...

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, whether a property supports the NiFi Expression Language, 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.

NameDefault ValueAllowable ValuesDescription
Connection Factory ServiceController Service API:
JMSConnectionFactoryProviderDefinition
Implementations: JMSConnectionFactoryProvider
JndiJmsConnectionFactoryProvider
The Controller Service that is used to obtain ConnectionFactory
Destination NameThe name of the JMS Destination. Usually provided by the administrator (e.g., 'topic://myTopic' or 'myTopic').
Supports Expression Language: true (will be evaluated using variable registry only)
Destination TypeQUEUE
  • QUEUE
  • TOPIC
The type of the JMS Destination. Could be one of 'QUEUE' or 'TOPIC'. Usually provided by the administrator. Defaults to 'QUEUE'
User NameUser Name used for authentication and authorization.
PasswordPassword used for authentication and authorization.
Sensitive Property: true
Connection Client IDThe client id to be set on the connection, if set. For durable non shared consumer this is mandatory, for all others it is optional, typically with shared consumers it is undesirable to be set. Please see JMS spec for further details
Supports Expression Language: true (will be evaluated using variable registry only)
Session Cache size1This property is deprecated and no longer has any effect on the Processor. It will be removed in a later version.
Character SetUTF-8The name of the character set to use to construct or interpret TextMessages
Supports Expression Language: true (will be evaluated using variable registry only)
Acknowledgement Mode2
  • AUTO_ACKNOWLEDGE (1) Automatically acknowledges a client's receipt of a message, regardless if NiFi session has been commited. Can result in data loss in the event where NiFi abruptly stopped before session was commited.
  • CLIENT_ACKNOWLEDGE (2) (DEFAULT) Manually acknowledges a client's receipt of a message after NiFi Session was commited, thus ensuring no data loss
  • DUPS_OK_ACKNOWLEDGE (3) This acknowledgment mode instructs the session to lazily acknowledge the delivery of messages. May result in both data duplication and data loss while achieving the best throughput.
The JMS Acknowledgement Mode. Using Auto Acknowledge can cause messages to be lost on restart of NiFi but may provide better performance than Client Acknowledge.
Durable subscriptionfalse
  • true
  • false
If destination is Topic if present then make it the consumer durable. @see https://docs.oracle.com/javaee/7/api/javax/jms/Session.html#createDurableConsumer-javax.jms.Topic-java.lang.String-
Supports Expression Language: true (will be evaluated using variable registry only)
Shared subscriptionfalse
  • true
  • false
If destination is Topic if present then make it the consumer shared. @see https://docs.oracle.com/javaee/7/api/javax/jms/Session.html#createSharedConsumer-javax.jms.Topic-java.lang.String-
Supports Expression Language: true (will be evaluated using variable registry only)
Subscription NameThe name of the subscription to use if destination is Topic and is shared or durable.
Supports Expression Language: true (will be evaluated using variable registry only)

Relationships:

NameDescription
successAll FlowFiles that are received from the JMS Destination are routed to this relationship

Reads Attributes:

None specified.

Writes Attributes:

NameDescription
jms_deliveryModeThe JMSDeliveryMode from the message header.
jms_expirationThe JMSExpiration from the message header.
jms_priorityThe JMSPriority from the message header.
jms_redeliveredThe JMSRedelivered from the message header.
jms_timestampThe JMSTimestamp from the message header.
jms_correlationIdThe JMSCorrelationID from the message header.
jms_messageIdThe JMSMessageID from the message header.
jms_typeThe JMSType from the message header.
jms_replyToThe JMSReplyTo from the message header.
jms_destinationThe JMSDestination from the message header.
other attributesEach message property is written to an attribute.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component does not allow an incoming relationship.

System Resource Considerations:

None specified.

See Also:

PublishJMS, JMSConnectionFactoryProvider