Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.

Stomp Component

Available as of Camel 2.12

The stomp: component is used for communicating with Stomp compliant message brokers, like Apache ActiveMQ or ActiveMQ Apollo

Maven users will need to add the following dependency to their pom.xml for this component:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-stomp</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>

URI format

stomp:queue:destination[?options]

Where destination is the name of the queue.

Options

Property

Default

Description

brokerURL

tcp://localhost:61613

The URI of the Stomp broker to connect to

login

 

The username

passcode

 

The password

host Camel 2.15.3/2.16: The virtual host
sslContextParametersnullCamel 2.17: Reference to a org.apache.camel.util.jsse.SSLContextParameters in the Registry.  The brokerURL should use ssl as protocol. See Using the JSSE Configuration Utility.

You can append query options to the URI in the following format, ?option=value&option=value&...

Samples

Sending messages:

from("direct:foo").to("stomp:queue:test");

Consuming messages:

from("stomp:queue:test").transform(body().convertToString()).to("mock:result")

Endpoints

Camel supports the Message Endpoint pattern using the Endpoint interface. Endpoints are usually created by a Component and Endpoints are usually referred to in the DSL via their URIs.

From an Endpoint you can use the following methods

See Also

© 2004-2015 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram