PublishJMS 2025.10.9.21

Bundle

org.apache.nifi | nifi-jms-processors-nar

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.

Tags

jms, message, publish, put, send

Input Requirement

REQUIRED

Supports Sensitive Dynamic Properties

false

Properties

PropertyDescription
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
Connection Factory ServiceThe Controller Service that is used to obtain Connection Factory. Alternatively, the ‘JNDI *’ or the ‘JMS *’ properties can also be used to configure the Connection Factory.
Destination NameThe name of the JMS Destination. Usually provided by the administrator (e.g., ‘topic://myTopic’ or ‘myTopic’).
Destination TypeThe type of the JMS Destination. Could be one of ‘QUEUE’ or ‘TOPIC’. Usually provided by the administrator. Defaults to ‘QUEUE’
Maximum Batch SizeThe maximum number of messages to publish or consume in each invocation of the processor.
PasswordPassword used for authentication and authorization.
SSL Context ServiceThe SSL Context Service used to provide client certificate information for TLS/SSL connections.
User NameUser Name used for authentication and authorization.
allow-illegal-chars-in-jms-header-namesSpecifies whether illegal characters in header names should be sent to the JMS broker. Usually hyphens and full-stops.
attributes-to-send-as-jms-headers-regexSpecifies the Regular Expression that determines the names of FlowFile attributes that should be sent as JMS Headers
brokerURI pointing to the network location of the JMS Message broker. Example for ActiveMQ: ‘tcp://myhost:61616’. Examples for IBM MQ: ‘myhost(1414)’ and ‘myhost01(1414),myhost02(1414)’.
cfThe fully qualified name of the JMS ConnectionFactory implementation class (eg. org.apache.activemq. ActiveMQConnectionFactory).
cflibPath to the directory with additional resources (eg. JARs, configuration files etc.) to be added to the classpath (defined as a comma separated list of values). Such resources typically represent target JMS client libraries for the ConnectionFactory implementation.
character-setThe name of the character set to use to construct or interpret TextMessages
connection.factory.nameThe name of the JNDI Object to lookup for the Connection Factory.
java.naming.factory.initialThe fully qualified class name of the JNDI Initial Context Factory Class (java.naming.factory.initial).
java.naming.provider.urlThe URL of the JNDI Provider to use as the value for java.naming.provider.url. See additional details documentation for allowed URL schemes.
java.naming.security.credentialsThe Credentials to use when authenticating with JNDI (java.naming.security.credentials).
java.naming.security.principalThe Principal to use when authenticating with JNDI (java.naming.security.principal).
message-body-typeThe type of JMS message body to construct.
naming.factory.librariesSpecifies jar files and/or directories to add to the ClassPath in order to load the JNDI / JMS client libraries. This should be a comma-separated list of files, directories, and/or URLs. If a directory is given, any files in that directory will be included, but subdirectories will not be included (i.e., it is not recursive).
record-readerThe Record Reader to use for parsing the incoming FlowFile into Records.
record-writerThe Record Writer to use for serializing Records before publishing them as an JMS Message.

Restrictions

Required PermissionExplanation
reference remote resourcesClient Library Location can reference resources over HTTP

Relationships

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

See also