PublishJMS

Description:

Creates a JMS Message from the contents of a FlowFile and sends it to a JMS Destination (queue or topic) as JMS BytesMessage or TextMessage. FlowFile attributes will be added as JMS headers and/or properties to the outgoing JMS message.

Additional Details...

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, 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 flow file attributes and variable registry)
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.
Message Body Typebytes
  • bytes
  • text
The type of JMS message body to construct.
Character SetUTF-8The name of the character set to use to construct or interpret TextMessages
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

Relationships:

NameDescription
successAll FlowFiles that are sent to the JMS destination are routed to this relationship
failureAll FlowFiles that cannot be sent to JMS destination are routed to this relationship

Reads Attributes:

NameDescription
jms_deliveryModeThis attribute becomes the JMSDeliveryMode message header. Must be an integer.
jms_expirationThis attribute becomes the JMSExpiration message header. Must be an integer.
jms_priorityThis attribute becomes the JMSPriority message header. Must be an integer.
jms_redeliveredThis attribute becomes the JMSRedelivered message header.
jms_timestampThis attribute becomes the JMSTimestamp message header. Must be a long.
jms_correlationIdThis attribute becomes the JMSCorrelationID message header.
jms_typeThis attribute becomes the JMSType message header. Must be an integer.
jms_replyToThis attribute becomes the JMSReplyTo message header. Must be an integer.
jms_destinationThis attribute becomes the JMSDestination message header. Must be an integer.
other attributesAll other attributes that do not start with jms_ are added as message properties.
other attributes .typeWhen an attribute will be added as a message property, a second attribute of the same name but with an extra `.type` at the end will cause the message property to be sent using that strong type. For example, attribute `delay` with value `12000` and another attribute `delay.type` with value `integer` will cause a JMS message property `delay` to be sent as an Integer rather than a String. Supported types are boolean, byte, short, integer, long, float, double, and string (which is the default).

Writes Attributes:

None specified.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

ResourceDescription
MEMORYAn instance of this component can cause high usage of this system resource. Multiple instances or high concurrency settings may result a degradation of performance.

See Also:

ConsumeJMS, JMSConnectionFactoryProvider