Skip to end of metadata
Go to start of metadata

Running StompConnect

Being pure Java you can embed StompConnect inside any JVM process very easily. The StompConnect code only depends on

  • commons-logging
  • the JMS API

So its very easy to add to any JMS Broker process or JVM capable of using a particular JMS client.

Using Dependency Injection

If you use some kind of dependency injection framework like Spring you can configure StompConnect using XML if you prefer. Just configure the StompConnect POJO with

  • the JMS ConnectionFactory instance
    • you can provide a JNDI InitialContext if you prefer, though its typcially easier to just provide the JMS ConnectionFactory
  • optionally you can provide the uri to expose the Stomp services on.
    • i.e. the host name and port that Stomp clients will connect to. Typically this will default to tcp://localhost:61613 but it can be any hostname/port.

Using the provided Main

StompConnect comes with a command line interface which can be used. Just invoke

With the CLASSPATH setup to include your JNDI provider's configuration in the file together with the StompConnect jar and your JMS client jars.

To see a list of possible arguments available try

Which at the time of writing generates...

  • No labels