you need a message producer and do producer.send(..., message); On 13 August 2010 12:40, BenXS <bxsto...@yahoo.co.uk> wrote: > > Assume I wrote a Java bean (configured by Spring) which receives successfully > incoming messages on a certain queue. So the "onMessage()" method looks > similar like: > > public void onMessage(Message message) { > ... > } > > Now I want to forward/sent the just received message into another queue > "bbbqueue" on the > same MessageBroker. > > Yes, I know, this can be done much easier by tools like Camel but my > described scenario above > is a much simplfied version of a complex application. So I have/want to use > a java bean for this. > > I just want to know how to put an already prepared message into another > queue with a MINIMUM of overhead. > Keep in mind that the FULL JMS message should be forwarded. That means the > actual payload body AND > all the JMS header (properties). > > It must be something similar to: > > public void onMessage(Message message) { > ... > this.send("bbbqueue", message); > } > > Unfortuenately the code above does not work. > How else can I code this? > > Ben > -- > View this message in context: > http://old.nabble.com/How-to-forward-a-full-message-received-in-Java-by-onMessage%28%29-into-another-queue--tp29427831p29427831.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > >
-- http://blog.garytully.com Open Source Integration http://fusesource.com