...
You can prefix any endpoint URI with binding:nameOfBinding: where nameOfBinding is the name of the Binding bean in your registry.
Code Block |
---|
from("binding:jaxb:activemq:myQueue").to("binding:jaxb:activemq:anotherQueue")
|
...
For example if you registered a new component called "jsonmq" in your registry using code like this
Code Block |
---|
JacksonDataFormat format = new JacksonDataFormat(MyBean.class);
context.bind("jsonmq", new BindingComponent(new DataFormatBinding(format), "activemq:foo."));
|
Then you could use the endpoint as if it were any other endpoint.
Code Block |
---|
from("jsonmq:myQueue").to("jsonmq:anotherQueue")
|
which This would be using use the queueus queues "foo.myQueue" and "foo.anotherQueue" and would use the given Jackson Data Format to marshal on and off the queue.
...