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.
Tags
jms, message, publish, put, send
Properties
In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.
Display Name | API Name | Default Value | Allowable Values | Description |
---|---|---|---|---|
Connection Factory Service | Connection Factory Service | Controller Service: JMSConnectionFactoryProviderDefinition Implementations: JMSConnectionFactoryProvider JndiJmsConnectionFactoryProvider | 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 Name * | Destination Name | The name of the JMS Destination. Usually provided by the administrator (e.g., 'topic://myTopic' or 'myTopic'). Supports Expression Language, using FlowFile attributes and Environment variables. | ||
Destination Type * | Destination Type | QUEUE |
| The type of the JMS Destination. Could be one of 'QUEUE' or 'TOPIC'. Usually provided by the administrator. Defaults to 'QUEUE' |
User Name | User Name | User Name used for authentication and authorization. Supports Expression Language, using Environment variables. | ||
Password | Password | Password used for authentication and authorization. | ||
Connection Client ID | Connection Client ID | The 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, using Environment variables. | ||
Message Body Type * | message-body-type | bytes |
| The type of JMS message body to construct. |
Character Set * | character-set | UTF-8 | The name of the character set to use to construct or interpret TextMessages Supports Expression Language, using FlowFile attributes and Environment variables. | |
Allow Illegal Characters in Header Names * | allow-illegal-chars-in-jms-header-names | 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 | |
Maximum Batch Size * | Maximum Batch Size | 1 | The maximum number of messages to publish or consume in each invocation of the processor. | |
Record Reader | record-reader | Controller Service: RecordReaderFactory Implementations: AvroReader CEFReader CSVReader ExcelReader GrokReader JsonPathReader JsonTreeReader ReaderLookup ScriptedReader Syslog5424Reader SyslogReader WindowsEventLogReader XMLReader YamlTreeReader | The Record Reader to use for parsing the incoming FlowFile into Records. | |
Record Writer * | record-writer | Controller Service: RecordSetWriterFactory Implementations: AvroRecordSetWriter CSVRecordSetWriter FreeFormTextRecordSetWriter JsonRecordSetWriter RecordSetWriterLookup ScriptedRecordSetWriter XMLRecordSetWriter | The Record Writer to use for serializing Records before publishing them as an JMS Message. This property is only considered if:
| |
JNDI Initial Context Factory Class | java.naming.factory.initial | The fully qualified class name of the JNDI Initial Context Factory Class (java.naming.factory.initial). Supports Expression Language, using Environment variables. | ||
JNDI Provider URL | java.naming.provider.url | The 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, using Environment variables. | ||
JNDI Name of the Connection Factory | connection.factory.name | The name of the JNDI Object to lookup for the Connection Factory. Supports Expression Language, using Environment variables. | ||
JNDI / JMS Client Libraries | naming.factory.libraries | Specifies 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). Supports Expression Language, using Environment variables. | ||
JNDI Principal | java.naming.security.principal | The Principal to use when authenticating with JNDI (java.naming.security.principal). Supports Expression Language, using Environment variables. | ||
JNDI Credentials | java.naming.security.credentials | The Credentials to use when authenticating with JNDI (java.naming.security.credentials). | ||
JMS Connection Factory Implementation Class | cf | The fully qualified name of the JMS ConnectionFactory implementation class (eg. org.apache.activemq.ActiveMQConnectionFactory). Supports Expression Language, using Environment variables. | ||
JMS Client Libraries | cflib | Path 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. Supports Expression Language, using Environment variables. | ||
JMS Broker URI | broker | URI 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, using Environment variables. | ||
JMS SSL Context Service | SSL Context Service | Controller Service: SSLContextService Implementations: StandardRestrictedSSLContextService StandardSSLContextService | The SSL Context Service used to provide client certificate information for TLS/SSL connections. |
Dynamic Properties
Name | Value | Description |
---|---|---|
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: Yes, evaluated using Environment variables. |
Relationships
Name | Description |
---|---|
failure | All FlowFiles that cannot be sent to JMS destination are routed to this relationship |
success | All FlowFiles that are sent to the JMS destination are routed to this relationship |
Reads Attributes
Name | Description |
---|---|
jms_correlationId | This attribute becomes the JMSCorrelationID message header. |
jms_deliveryMode | This attribute becomes the JMSDeliveryMode message header. Must be an integer. |
jms_destination | This attribute becomes the JMSDestination message header. Must be an integer. |
jms_expiration | This attribute becomes the JMSExpiration message header. Must be a long. |
jms_priority | This attribute becomes the JMSPriority message header. Must be an integer. |
jms_redelivered | This attribute becomes the JMSRedelivered message header. |
jms_replyTo | This attribute becomes the JMSReplyTo message header. Must be an integer. |
jms_timestamp | This attribute becomes the JMSTimestamp message header. Must be a long. |
jms_type | This attribute becomes the JMSType message header. Must be an integer. |
other attributes .type | When 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). |
other attributes | All other attributes that do not start with jms_ are added as message properties. |
Writes Attributes
This processor does not write attributes.
State Management
This component does not store state.
Restricted
Required Permission | Explanation |
---|---|
reference remote resources | Client Library Location can reference resources over HTTP |
Input Requirement
This component requires an incoming relationship.
System Resource Considerations
Scope | Description |
---|---|
MEMORY | An instance of this component can cause high usage of this system resource. Multiple instances or high concurrency settings may result a degradation of performance. |