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. firstname.lastname@example.org 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 (stomp.codehaus.org) 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 http://stomp.codehaus.org/ 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 jndi.properties for example, with #3 example, a jndi.properties contains, java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory java.naming.provider.url=file:///C:/mq_admin_objects place the jndi.properties 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 http://commons.apache.org/logging/] File System JNDI Service Provider: . fscontext.jar - dependency because of #3 . providerutil.jar - dependency because of #3 [download from http://java.sun.com/products/jndi/downloads/index.html] . 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 email@example.com