Thanks Gert for your ideas. I cannot finally imagine the way you recommended. Could you give a code example? ..Me bean implements the org.apache.servicemix.MessageExchangeListener and so I have access to the message (javax.jbi.messaging.MessageExchange). But I don't know how to receive the correlation id from that point. And how belongs this id to me starting routing point (Point1 - file:poller)? Well, I'm new in this java esb area and please appologize maybe stupid questions.... ;-)
Thanks, hoping to read you, again. Andreas Gert Vanthienen wrote: > > Andreas, > > Looking at the route, it looks like you're trying to archive processed > exchanges. You could do this by adding an ExchangeListener to the > container, which will then get invoked for every exchange passing > through the NMR. You can then keep track of all the exchanges by > looking at their correlation id and this will allow you to figure out > what the original exchange was and where it came from. The additional > benefit is that you can archive the XML message when the last exchange > in the entire flow has reached the DONE status, so you're 100% sure > that all the exchanges are fully handled before archiving them. > > We've implemented something along these lines for a customer, so I'm > going to check if they're willing to donate/share some of that code, > but if they don't and you would like to investigate this possibility, > I'll gladly try to help you out whenever you run into problems. > > Regards, > > Gert Vanthienen > ------------------------ > Open Source SOA: http://fusesource.com > Blog: http://gertvanthienen.blogspot.com/ > > > > 2009/10/8 atr <[email protected]>: >> >> Hello. >> >> I've got a problem with ServiceMix 3.2. and a message routing. Following: >> >> I receive a message with a file poller: >> Point 1: >> <file:poller service="sportscheck:OrdersInProduction" >> endpoint="endpoint" >> targetService="sportscheck:eip" >> file="${demandware.export.production.orders}" >> recursive="true" >> period="${orders.dw.export.210.filepoller}" >> filter="#XMLFilter"> >> </file:poller> >> >> This message will be sent to: >> Point 2: >> <eip:static-recipient-list service="sportscheck:eip" >> endpoint="endpoint"> >> <eip:recipients> >> <eip:exchange-target >> service="sportscheck:orderBean" /> >> <eip:exchange-target >> service="sportscheck:archiveBean" /> >> </eip:recipients> >> </eip:static-recipient-list> >> >> and then again to: >> Point 3: >> <bean:endpoint service="sportscheck:orderBean" >> endpoint="endpoint" bean="#OrderBean" /> >> <bean id="OrderBean" >> class="de.mmsdresden.sportscheck.beans.OrderBean" >> /> >> <bean id="ArchiveBean" >> class="de.mmsdresden.sportscheck.beans.ArchiveBean" /> >> </beans> >> >> The java bean receives the message as object of type >> javax.jbi.messaging.MessageExchange. >> How can I identify the starting point (Point 1) of my message, what is in >> my >> example the file:poller ? >> >> I need any identifying information, because I use this message routing >> way >> (Point1 - Point2 - Point3) with several <file:pollers> (Point1a - Point1b >> - >> Pointxyz). In my java bean I want be able to know where my message comes >> from, which file poller (Point1a - Point1b - Pointxyz) have been used. >> >> I can I solve shuch a problem? Is there a possibility to provide a >> variable >> in the different file pollers or can is get the name of the service (in >> my >> example "sportscheck:OrdersInProduction")? >> >> Thank you really for a help! >> >> Andreas. >> -- >> View this message in context: >> http://www.nabble.com/How-to-identify-message-origin-after-several-routings---tp25801620p25801620.html >> Sent from the ServiceMix - User mailing list archive at Nabble.com. >> >> > > > ----- > --- > Gert Vanthienen > http://gertvanthienen.blogspot.com > -- View this message in context: http://www.nabble.com/How-to-identify-message-origin-after-several-routings---tp25801620p25817546.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
