User example for STOMP integration with Open MQ. This was introduced in build 2 of Open MQ 4.3.

Support for STOMP Example

Please note: The Open MQ Project (members, sponsors, or underwriters) does not support the STOMP runtime (i.e. we are not committers, nor authors, of the STOMP project). Through the community (i.e. or the Open MQ Forum), we will do our best to help answer questions and offer our experience, however you may need to refer to the STOMP project ( for additional details and possibly for assistance with STOMP configuration and internals.

This example is provided on an As Is Basis. You are welcome to use this example, but your use is entirely at your own risk.

Using the example

First, install the promoted build (build 2 or higher), then you will find this example in the directory: <Need Directory where StompClient.html will ultimately reside> . The following README, and a companion C# example are available in this .zip archive (right click and choose save as)

The following describes how you can use STOMP from a Windows client, using .NET and C#. (This is a viewable version of the file included in the .zip archive above)

Steps to run the C# Stomp Client:
1. Download StompConnect from 

2. Start MQ broker 

   for example, 
   imqbrokerd -tty 

3. Create a MQ administrative object of ConnectionFactory

   for example on Windows, with #2 example, on the broker running machine,

   imqobjmgr add -t qf -l cn=QCF -j "java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory" -j "java.naming.provider.url=file:///C:/mq_admin_objects" 
4. Create a JNDI resource file

   for example, with #3 example, a contains,

   place the file in a location that is on #5's classpath
5. Start StompConnect

   for example, with #3 example, on the broker running machine, 

   java -classpath <classpath> org.codehaus.stomp.jmsMain tcp://localhost:6666 cn=QCF

   The StompConnect needs following jar files: 

   . StompConnect jar file

   . commons-logging jar file - dependency of StompConnect 
     [download from]
   File System JNDI Service Provider:
   . fscontext.jar    - dependency because of #3 
   . providerutil.jar - dependency because of #3
     [download from]

   . imq.jar - MQ client runtime
   . jms.jar - dependency of MQ client runtime and StompConnect

6. On a Windows machine that has Microsoft .NET Framework
   (can be the same machine or different from #5)

   (1) Compile the StompClient.cs 

       csc Stompclient.cs

   (2) Run the StompClient

       a. run as sender 
          StompClient s <stompconnect-host> <stompconnect-port> <queue-name> 

          for example, with #5 example,
          StompClient s <stompconnect-host> 6666 <queue-name>

       b. run as receiver 
          StompClient r <stompconnect-host> <stompconnect-port> <queue-name> 

Send feedback to
Terms of Use; Privacy Policy; Copyright ©2013-2017 (revision 20160708.bf2ac18)
Please Confirm