JMS Publisher
The JMS Publisher receives messages from Java Message System (JMS)-compliant message brokers, such as IBM WebSphere MQ, and publishes them to topics.
Setting up a JMS Message Broker with FME Server
Before configuring a JMS publisher, you must set up a JMS broker to work with FME Server. The steps depend on the broker you use, and are explained in the following section (applicable to both the JMS Publisher and JMS Subscriber):
Creating a JMS Publisher for FME Server
- In the FME Server Web User Interface, select Manage > Notifications, then select the Publications tab, and click New.
- Provide a name for the Publication.
- Specify the topics to publish to. When receiving JMS messages from the message broker, these topics will be notified.
- Specify ‘jms’ for the protocol.
- Specify the JMS-specific fields for the publisher
- Click OK.
Provider Type or Context | The message broker to connect to, or the initial context factory if the broker is not listed. |
Provider URL | The URL of the directory containing connection details for the JMS provider. |
Additional Provider Properties |
Any additional provider-specific properties, in the form key=value. For example, randomize=false. Specify multiple pairs on separate lines. In most cases, this field is not required. The JMS brokers tested by Safe, including Apache ActiveMQ, IBM Websphere MQ, and Oracle WebLogic JMS, do not require any additional properties to establish a connection. |
Connection Factory | The name of the connection factory object. |
Username | An authenticating username. |
Password | An authenticating password. |
Destination(s) | The name of the destination object(s). These correspond to queues and/or topics. Multiple destinations can be specified, separated with a comma. |
Apache ActiveMQ Sample Configuration
Java Classpath |
No change required. (Apache ActiveMQ 5.6.0 libraries are bundled with FME Server.) |
Provider Type or Context | ACTIVEMQ |
Provider URL | tcp://server:61616 |
Additional Provider Properties | -- |
Connection Factory | ConnectionFactory |
Username |
-- |
Password |
-- |
Destination(s) | dynamicQueues/MyQueue |
IBM WebSphere 7 Sample Configuration
Java Classpath | ... -FMESERVER_CLASSPATH “...;C:/Program Files (x86)/IBM/WebSphere MQ/java/lib/*” ... |
Provider Type or Context | WEBSPHERE70 |
Provider URL | file:/C:/jndi/ |
Additional Provider Properties | -- |
Connection Factory | cf1 |
Username | admin |
Password | admin |
Destination(s) | q1,t1 |
Oracle Weblogic Sample Configuration
Provider Type or Context | weblogic.jndi.WLInitialContextFactory |
Provider URL | t3://bq-w2008:7001 |
Additional Provider Properties | -- |
Connection Factory | jms/TestConnectionFactory |
Username |
-- |
Password |
-- |
Destination(s) | jms/TestJMSQueue |
Notification Content
The JSON notification content is comprised of the following key-value pairs:
"fns_type": "jms_publisher"
- "jms_publisher_type": This value can be one of the following JMS message types:
- "text" - TextMessage
- "object" - ObjectMessage
- "map" - MapMessage
- "jms_publisher_content": This value can be one of the following:
- "<content>" - The content of a TextMessage.
- "<object>.toString()" - The content of an ObjectMessage.
- "<map_key1> = <map_value1>, <map_key2> = <map_value2>", and so on - The name-value pairs that comprise a MapMessage.
Example
This example notification is sent based on a TextMessage received from a message broker. The message body contained "Hello World".
{
"fns_type": "jms_publisher"
"jms_publisher_type": "text"
"jms_publisher_content": "Hello World"
}
See Also