AMQP-STOMP component
The
amqp-stompcomponent is Cameleer's JMS-over-STOMP component under a third name, for routes that used Cameleer's former STOMP-basedamqpscheme.
Scheme: amqp-stomp: · Crate: cameleer-amqp · Cargo feature: amqp ·
Consumer: yes · Producer: yes · Apache Camel: none (Cameleer only; see JMS)
When to use it
- You have routes from an earlier Cameleer version where
amqp:meant JMS over STOMP. Rename the scheme toamqp-stomp:and keep the rest. - You want JMS semantics through a STOMP connector and also use amqp (AMQP 1.0) in the same application, with separate component settings.
For new routes use jms (STOMP) or amqp (AMQP 1.0, Camel's meaning of amqp:).
URI format
amqp-stomp:[queue:|topic:|temp-queue:|temp-topic:]destinationName[?options]Example
- route:
id: work-queue
from:
uri: amqp-stomp:queue:jobs
parameters:
brokerURL: "{{env:STOMP_BROKER_URL:tcp://localhost:61613}}"
concurrentConsumers: 3
steps:
- log: "job ${body}"
- to: log:jobsThree consumers compete for the messages on the queue jobs.
Rust DSL
use cameleer_core::prelude::*;
pub fn routes(ctx: &CamelContext) -> Result<()> {
ctx.add_routes(|b| {
b.from("amqp-stomp:queue:jobs?brokerURL=tcp://localhost:61613&concurrentConsumers=3")
.route_id("work-queue")
.log("job ${body}")
.to("log:jobs");
})
}Options
The same as jms. Component-wide settings use the prefix camel.component.amqp-stomp.;
the broker URL may also be given as camel.component.amqp-stomp.remoteURI.
Message headers
The same as jms.
Run it with Docker
docker run --rm -e STOMP_BROKER_URL=tcp://broker:61613 -v "$PWD:/routes:ro" pmsudhi/cameleer run /routes/jobs.camel.yamlCommon questions
Why is there an amqp-stomp scheme at all?
Apache Camel's amqp: is JMS over AMQP 1.0. When Cameleer gained an AMQP 1.0 stack, amqp: took that
meaning and the older STOMP flavour moved to amqp-stomp:.
Related
Found a problem?
If something on this page doesn't match what Cameleer does, or you hit a bug while building
with it, please help fix it, whether you are a person or a coding agent:
open an issue that describes what you saw,
then fork the repository, fix it, add or update a test, run cargo test --workspace, and open
a pull request. CONTRIBUTING.md
explains the ground rules.