Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Este contenido no está disponible en el idioma seleccionado.
Chapter 169. Stomp
Stomp Component Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
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:
URI format Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
stomp:queue:destination[?options]
stomp:queue:destination[?options]
Where destination is the name of the queue.
Options Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
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. | |
sslContextParameters
|
null
|
Camel 2.17: Reference to a org.apache.camel.util.jsse.SSLContextParameters in the Registry. The broker URL should use ssl as the protocol.
|
You can append query options to the URI in the following format,
?option=value&option=value&...
Samples Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
Sending messages:
from("direct:foo").to("stomp:queue:test");
from("direct:foo").to("stomp:queue:test");
Consuming messages:
from("stomp:queue:test").transform(body().convertToString()).to("mock:result")
from("stomp:queue:test").transform(body().convertToString()).to("mock:result")