JMS Message
The JMS Message external action receives messages and relays them to Java Message System (JMS)-compliant message brokers, such as IBM WebSphere MQ.
The JMS Message external action has two output ports. The success port (✔) can send a message if the message broker is notified successfully. The failure port (x) can send a message if the notification fails.
Setting up a JMS Message Broker with FME Flow
Before configuring a JMS Message external action, you must set up a JMS broker to work with FME Flow. The steps depend on the broker you use, and are explained in the following section:
Parameters
- 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.
- 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.
- Use Persistent Delivery: If Yes, messages are stored by the JMS broker until the message is delivered to a destination, and can be recovered in the event of a broker restart. If No, messages may be lost in the event of a broker restart during delivery. Persistent delivery is slower than non-persistent delivery, particularly when sending large volumes of messages.
- Notification Content Template: The message body.
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.
Sample Configurations
Apache ActiveMQ Sample Configuration
Java Classpath |
No change required. (Apache ActiveMQ 5.6.0 libraries are bundled with FME Flow.) |
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 |
Output Attributes
See Also
Attribute | Description |
---|---|
time | Event time |
source | Event type |
error.type |
(Failure port only) Error type:
|
error.message | (Failure port only) Error message |
Retry
- Retry on failure: If checked, the automation attempts to run the action again if the initial attempt results in a failure to connect to the specified external resource for message delivery. The manner in which these retries are conducted is based on the remaining settings.
- Use custom retry settings: If checked, the remaining retry settings are configurable. If not checked, they are set to the FME Flow default values.
- Number of attempts: Maximum number of retries, if the action continues to fail.
- Wait between attempts: Time to wait between retries. In conjunction with Backoff multiplier (below), the specified value is the wait time for the first retry.
- Backoff multiplier: Factor by which to increase Wait between attempts on successive retries. For example, a value of 2.0 doubles the wait time for the next retry.
- Randomization factor: Percentage by which to introduce randomness to Wait between attempts. For example, if Wait between attempts is 100 Seconds, and Randomization factor is 25, the wait time for each retry is randomly selected between 75 and 125 seconds.
- Maximum wait between attempts: Maximum wait time between retries. In conjunction with Backoff multiplier, the specified value is the upper limit for wait time.