Category: JMS options


What's the configuration for swiftmq from C++?


When configuring the runtime for use with swiftMQ you should try the following configuration. We have not tried this ourselves, but an evaluator reported it as a working configuration with a swiftMQ server of a version unknown to us. They used the following lookup names. With these values and a working Java JMS example as guidance, you should have little trouble getting your JMS C++ applications working with your own swiftMQ server:

Item Lookup name
Queue connection factory myQueueConnectionFactory
Queue for testing testqueue@router1
Topic connection factory myQueueConnectionFactory
Topic for testing testtopic

The following sections provide example snippets for configuring the runtime for swiftMQ as a JMS provider.


xmog_jvm_loader & loader = xmog_jvm_loader::get_jvm_loader();
// ------------------------------------------------------------------
// you have to add one jar file to the classpath
loader.appendToClassPath( "<FQN of swiftmq.jar>" );

// ------------------------------------------------------------------
// you have configure the JNDI setup
loader.setDashDOption( "java.naming.factory.initial",
                       "com.swiftmq.jndi.InitialContextFactoryImpl" );
// this assumes swiftmq default setup running on localhost
loader.setDashDOption( "java.naming.provider.url",
                       "smqp://localhost:4001" );

Configuration File


      <Loader name="Default" />
        <!-- set the classpath so it's right for the JMS provider           -->
        <!-- make sure that the fileseparator is correct for your platform  -->
        <add key="ClassPath" value="c:\swiftmq\lib\swiftmq.jar" />

        <!-- here we configure the JNDI options for our JMS vendor          -->
        <add key="java.naming.factory.initial" value="com.swiftmq.jndi.InitialContextFactoryImpl" />
        <add key="java.naming.provider.url" value="smqp://localhost:4001" />
        <!--add key="" value="admin" />
        <add key="" value="secret" /-->


Copyright 2006-2011 by Codemesh, Inc., ALL RIGHTS RESERVED

frequently asked questions
home products support customers partners newsroom about us contact us