Contact Us 1-800-596-4880

Configuring the JMS Connector for FioranoMQ 2007

FioranoMQ is a High Performance Enterprise Communication Backbone. To use the FioranoMQ connector, you configure the JMS namespace and connector as follows:

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:spring="http://www.springframework.org/schema/beans"
      xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.0/mule.xsd
       http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/3.0/mule-jms.xsd">

<jms:connector name="FioranoJMSConnector"
               connectionFactoryJndiName="PrimaryCF"
               jndiInitialFactory="fiorano.jms.runtime.naming.FioranoInitialContextFactory"
               specification="1.1"
               jndiProviderUrl="http://localhost:1856"
               username="anonymous"
               password="anonymous">

    <!-- A few optional values for the factory -->
    <spring:property key="connectionFactoryProperties">
        <spring:map>
            <spring:entry key="clientID" value="sampleClientID"/>
            <spring:entry key="ConnectURL" value="http://localhost:1856"/>
            <spring:entry key="BackupConnectURLs" value="http://localhost:1956"/>
        </spring:map>
    </spring:property>
</jms:connector>
...

You will need the following jars on your classpath:

  • FioranoMQ2007/fmq/lib/client/all/fmq-client.jar

  • FioranoMQ2007/framework/lib/all/fiorano-framework.jar

Sample Usage

The following steps illustrate modifying the "Echo" sample shipped with Mule. Instead of using System.out in the outbound router, we will write the output onto a Topic in FioranoMQ using the above configuration.

Modify the outbound router in the echo-config.xml under examples\echo\conf to use a Topic:

<jms:outbound-endpoint topic="muleTopic"/>

Start the durable connection sample available in FioranoMQ from a command prompt in fmq/samples/PubSub/DurableSubscribers as shown below:

runClient DurableSubscriber -clientid sampleClientID -topicName muleTopic

Now on starting Mule with the above echo-config.xml file we can push messages onto the topic and consequently to the subscriber.
The durable connection property can also be tested by killing the subscriber, pumping in more messages and then again starting the subscriber.