Created on 12-20-201810:34 PM - edited 08-17-201905:10 AM
This article provides the steps for using ConsumeJMS and
PublishJMS processors with Weblogic Topics and Queues.
In this article a Weblogic 12c server was used with HDF-3.3.0.
Also, for this article the JMS Server, Connection Factory, Queue and Topic have
already been added to the Weblogic server. These blogs were used as references
for this article, Install Weblogic 12.1.3 server, Basic JMS Demo using WebLogic Queue. Much of the credit for the information here
goes to @emattos and @Jay Kumar SenSharma, both provided a great deal of assistance in
understanding the Weblogic server and sample java programs for testing.
Note: The JndiJmsConnectionFactoryProvider
controller service was introduced in HDF-3.3.0. So, this controller service
isn’t available in any earlier versions of HDF.
In this article we'll
use a simple flow to demonstrate the functionality of the processors. This is not meant to be an exhaustive article
on the PublishJMS and ConsumeJMS processors.
Just the information required to get the processors working.
The configuration of
the controller service is based on the configuration of a very simple queue and
topic in a Weblogic 12c server. A full explanation of the creation of the JMS
server, Connection Factory, Queue and Topic can be found in the blogs listed in
the beginning of the article. For
reference, here is the configuration of the Weblogic server used for this
The Connection Factory,
Queue and Topic.
Based on the above information, this is the configuration of the
JndiJmsConnectionFactoryProvider controller service:
The Initial Naming Factory Class property is used to identify the factory that actually creates the
Context. To use WebLogic JNDI, you use weblogic.jndi.WLInitialContextFactory.
The Naming Provider URL, specifies the URL of the WebLogic Server that provides the
name serviceused, for this
tutorial it is just the default value.
The controller service
uses the Java Naming and Directory Interface (JNDI) to lookup a JMS connection
factory. So, the JNDI name of the
Connection Factory, MCF1, is used in the Connection
Factory Name property of the controller service.
The Naming Factory
Libraries property just identifies the jar with the Initial Naming Factory Class.
Now that the controller service is configured,
the processors can be configured.
The PublishJMS processor
The flow simply tails the
local nifi-app.log file, splits the flow files into single log lines and then
writes the log lines to queue Queue1 and topic Topic1.
The configuration of the
PublishJMS processor for Queue1
The Destination Name property can be seen in the Weblogic console.
The configuration of the
PublishJMS processor for Topic1 is the same except for the Destination Type and Destination Name properties.
Here is the simple flow demonstrating the ConsumeJMS processors
for Queue1 and Topic1.
The configuration of the ConsumeJMS processors are the same for the Connection Factory Service, Destination
Name and Destination Type