Hi All,
I am using servicemix version3.3.2. I have a requirement to forward message
exchange received in bean to another jms provider service after some
processing on message. this bean implements MessageExchangeListener
interface. I tried to forward same message exchange to provider jms service
by setting exchange service
I have created new Message exchange this way but it doesnt work and message
doesnt go to provider jms queue.
exchange.setService(new QName("http://replaceMe/","service4"));
so I created another exchange following way:
MessageExchangeFactory factory = channel.createExchangeFactory(new
QName("http://replaceMe","service4"));
InOnly inExchange = factory.createInOnlyExchange();
NormalizedMessage outmsg = inExchange.createMessage();
outmsg.setContent(content);
inExchange.setInMessage(outmsg);
inExchange.setService(new QName("http://replaceMe","service4"));
channel.send(inExchange);
This bean receives the message exchange properly but when i try to send it
from here by creatingg new exchange it gets into infinite loop and keep
sending messages to JMS provider queue.I have to kill the service mix
process to stop it sending messages.
I guess that original exchange is still on channel so it keep executing
bean's onMessageExchange method and keep sending new exchange to provider.
Please let me know if there is any other way of forwarding this message from
bean to another service or how can i stop sending infinite number of message
to provider queue?
--
View this message in context:
http://old.nabble.com/forwarding-message-exchange-from-bean-su-to-another-jms-provider-service-tp28880528p28880528.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.