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

Display NameAPI NameDefault ValueAllowable ValuesDescription
Connection Factory ServiceConnection Factory ServiceController Service API:
JMSConnectionFactoryProviderDefinition
Implementations: JndiJmsConnectionFactoryProvider
JMSConnectionFactoryProvider
The Controller Service that is used to obtain Connection Factory. Alternatively, the 'JNDI *' or the 'JMS *' properties can also be be used to configure the Connection Factory.
Destination NameDestination 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 TypeDestination 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 NameUser Name used for authentication and authorization.
Supports Expression Language: true (will be evaluated using variable registry only)
PasswordPasswordPassword used for authentication and authorization.
Sensitive Property: true
Connection Client IDConnection 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 SizeSession Cache size1This property is deprecated and no longer has any effect on the Processor. It will be removed in a later version.
Message Body Typemessage-body-typebytes
  • bytes
  • text
The type of JMS message body to construct.
Character Setcharacter-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)
Allow Illegal Characters in Header Namesallow-illegal-chars-in-jms-header-namesfalse
  • true
  • false
Specifies whether illegal characters in header names should be sent to the JMS broker. Usually hyphens and full-stops.
Attributes to Send as JMS Headers (Regex)attributes-to-send-as-jms-headers-regex.*Specifies the Regular Expression that determines the names of FlowFile attributes that should be sent as JMS Headers
Record Readerrecord-readerController Service API:
RecordReaderFactory
Implementations: GrokReader
JsonTreeReader
WindowsEventLogReader
ReaderLookup
ParquetReader
CSVReader
Syslog5424Reader
ExcelReader
CEFReader
XMLReader
ScriptedReader
SyslogReader
JsonPathReader
AvroReader
YamlTreeReader
The Record Reader to use for parsing the incoming FlowFile into Records.
Record Writerrecord-writerController Service API:
RecordSetWriterFactory
Implementations: FreeFormTextRecordSetWriter
CSVRecordSetWriter
ParquetRecordSetWriter
RecordSetWriterLookup
ScriptedRecordSetWriter
XMLRecordSetWriter
JsonRecordSetWriter
AvroRecordSetWriter
The Record Writer to use for serializing Records before publishing them as an JMS Message.

This Property is only considered if the [Record Reader] Property has a value specified.
JNDI Initial Context Factory Classjava.naming.factory.initialThe fully qualified class name of the JNDI Initial Context Factory Class (java.naming.factory.initial).
Supports Expression Language: true (will be evaluated using variable registry only)
JNDI Provider URLjava.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.
Supports Expression Language: true (will be evaluated using variable registry only)
JNDI Name of the Connection Factoryconnection.factory.nameThe name of the JNDI Object to lookup for the Connection Factory.
Supports Expression Language: true (will be evaluated using variable registry only)
JNDI / JMS Client Librariesnaming.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).

This property expects a comma-separated list of resources. Each of the resources may be of any of the following types: directory, file, URL.

Supports Expression Language: true (will be evaluated using variable registry only)
JNDI Principaljava.naming.security.principalThe Principal to use when authenticating with JNDI (java.naming.security.principal).
Supports Expression Language: true (will be evaluated using variable registry only)
JNDI Credentialsjava.naming.security.credentialsThe Credentials to use when authenticating with JNDI (java.naming.security.credentials).
Sensitive Property: true
JMS Connection Factory Implementation ClasscfThe fully qualified name of the JMS ConnectionFactory implementation class (eg. org.apache.activemq.ActiveMQConnectionFactory).
Supports Expression Language: true (will be evaluated using variable registry only)
JMS Client LibrariescflibPath 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.

This property expects a comma-separated list of resources. Each of the resources may be of any of the following types: directory, file, URL.

Supports Expression Language: true (will be evaluated using variable registry only)
JMS Broker URIbrokerURI 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)'.
Supports Expression Language: true (will be evaluated using variable registry only)
JMS SSL Context ServiceSSL Context ServiceController Service API:
SSLContextService
Implementations: StandardSSLContextService
StandardRestrictedSSLContextService
The SSL Context Service used to provide client certificate information for TLS/SSL connections.

Dynamic Properties:

Supports Sensitive Dynamic Properties: No

Dynamic Properties allow the user to specify both the name and value of a property.

NameValueDescription
The name of a Connection Factory configuration property.The value of a given Connection Factory configuration property.Additional configuration property for the Connection Factory. It can be used when the Connection Factory is being configured via the 'JNDI *' or the 'JMS *'properties of the processor. For more information, see the Additional Details page.
Supports Expression Language: true (will be evaluated using variable registry only)

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:

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

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