Sorry, if I’ve understood you wrongly, but perhaps you can send messages
exactly from your processor --- SomeProcess?

Something like that:

private CamelContext camelContext; // somewhere you create a camel context
…
class SomeRoutes extends RouteBuilder {

    private ProducerTemplate producerTemplate =
camelContext.createProducerTemplate();

    @Override
    public void configure() throws Exception {
        from("xmpp://XMPPConsumer?password=xxxx").process(SomeProcess);
    }

    class SomeProcess implements Processor {
        @Override
        public void process(Exchange exchange) throws Exception {
            String destination = "d1";  //set destination the way you need
            String uri = "xmpp://XMPPProducer/" + destination +
"?password=xxxx");
            producerTemplate.sendBody(uri, "Some sort of message.");

        }
    }
}

If you are using dependency injection, you may prefer to use @Produce on
producerTemplate.

Or you can use a recipient list, especially if you want to send message to
multiple destinations. http://camel.apache.org/recipient-list.html

.....
> Alessandro
> --
> View this message in context:
http://camel.465427.n5.nabble.com/XMPP-Component-Questions-tp696503p696503.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to