According to Apache Camel documentation, "Camel supports the Guaranteed Delivery from the EIP patterns using among others the following components: ... JMS."
I'm trying to understand if this means I can use JMS in the middle of a multi-component route to "guarantee delivery."
For example, I have some routes that looks like this:
from("rest://post:someRestRoute")
// blah blah
.to("jms:queue:someQueue");
from("jms:queue:someQueue")
// blah blah
.to("spring-ws:someAddress")
.to("someOtherRoute");
Does using JMS in the middle of a multi-component route have any benefits? Camel is writing to and reading from the queue, and the queue is running on the same computer and same JVM, so Camel is only guaranteeing delivery to itself, which seems redundant.
For example,
- A message is POSTed to
someRestRoute
. - The message is queued and persisted on
someQueue
. - The message is immediately dequeued.
- The message is sent to a webservice at
someAddress
.
As I understand it, as far as the JMS broker is concerned the message is "delivered" the moment it's successfully dequeued; it doesn't matter if spring-ws:someAddress
throws an exception. I suppose this might be helpful if Camel crashed immediately after step 2, but I was hoping to guarantee delivery to someAddress
.
Does using JMS in the middle of a multi-component route have any benefits? Can it be used to "guarantee delivery" to someAddress
in the example?