You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by hqi65334 <hq...@mciek.com> on 2015/01/13 09:55:06 UTC

how to send a new message to an endpoint, continue with the current one

Hi,

from("direct:start").process(processorA).to(myqueue).processor(processorB);
	
after processing with processorA I'd like to send a customized message to
the myqueue
and continue with the output of processorA in processorB. 

What is the best way to to it in camel?

My first idea was to send it to a seda:queue and create a customized message
there and then send it to myqueue

Thanks for help!



--
View this message in context: http://camel.465427.n5.nabble.com/how-to-send-a-new-message-to-an-endpoint-continue-with-the-current-one-tp5761616.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: how to send a new message to an endpoint, continue with the current one

Posted by Reji Mathews <co...@gmail.com>.
You can even check out Camel ProducerTemplate ..

Cheers
Reji
On 13 Jan 2015 14:34, "hqi65334" <hq...@mciek.com> wrote:

> Hi,
>
> from("direct:start").process(processorA).to(myqueue).processor(processorB);
>
> after processing with processorA I'd like to send a customized message to
> the myqueue
> and continue with the output of processorA in processorB.
>
> What is the best way to to it in camel?
>
> My first idea was to send it to a seda:queue and create a customized
> message
> there and then send it to myqueue
>
> Thanks for help!
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/how-to-send-a-new-message-to-an-endpoint-continue-with-the-current-one-tp5761616.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: how to send a new message to an endpoint, continue with the current one

Posted by hqi65334 <hq...@mciek.com>.
Thanks, I will try it.

.wireTap(myqueue).newExchangeBody(new Expression() {

    public <T> T evaluate(Exchange exchange, Class<T> type) {
        return (T) new QueueMsg();
   }
}).end()


I assume all current properties and headers would not be sent to the queue



--
View this message in context: http://camel.465427.n5.nabble.com/how-to-send-a-new-message-to-an-endpoint-continue-with-the-current-one-tp5761616p5761618.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: how to send a new message to an endpoint, continue with the current one

Posted by Charlie Mordant <cm...@gmail.com>.
Hi,

You can use the wiretap pattern to do this.

Regards,

2015-01-13 9:55 GMT+01:00 hqi65334 <hq...@mciek.com>:

> Hi,
>
> from("direct:start").process(processorA).to(myqueue).processor(processorB);
>
> after processing with processorA I'd like to send a customized message to
> the myqueue
> and continue with the output of processorA in processorB.
>
> What is the best way to to it in camel?
>
> My first idea was to send it to a seda:queue and create a customized
> message
> there and then send it to myqueue
>
> Thanks for help!
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/how-to-send-a-new-message-to-an-endpoint-continue-with-the-current-one-tp5761616.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent