-
1. Re: Problem - Bug with split and activemq with transferExchange=true
davsclaus May 27, 2011 7:31 AM (in response to dherla)The splitter need to store some state on each sub exchange and that information is not serializable.
The transferExchange option on JMS is limited as JMS spec only allows X number of types to be send over JMS.
Whats your use case to use transferExchange ?
-
2. Re: Problem - Bug with split and activemq with transferExchange=true
dherla May 30, 2011 4:23 AM (in response to davsclaus)I have a series of camel routes.
I try to explain.
route 1 : Poll a directory, make some validation on the file found and move file (one or more) to a working directory (specific for each file which start the process). I put the specific working directory in a property of the exchange and send to a queue with transferExchange to keep the property of the exchange.
route 2 : read from the previous queue, split with custom pojo (unzip and create a list of file unzipped). On each splitted element, i make some job (create command message for an external application) and send to a queue with transferExchange to keep the property of the original exchange and the property of the split process (camelSplitComplete).
route 3 : read from the previous queue, process the command message (the external application create some files in the working directory and respond only with the master filename created) and aggregate the result based on camelSplitComplete.
Do you have a better solution ?
Thanks in advance
D
-
3. Re: Problem - Bug with split and activemq with transferExchange=true
davsclaus May 30, 2011 5:43 AM (in response to dherla)Just put information as headers and do not use transferExchange
-
4. Re: Problem - Bug with split and activemq with transferExchange=true
dherla May 30, 2011 6:36 AM (in response to davsclaus)If i understand correctly, i put my properties in the headers of the message.
OK i try but where the split put the properties ? In the doc, i see in the exchange. How i can retrieve the property camelSplitComplete ?
thanks in advance
Dimitri
-
5. Re: Problem - Bug with split and activemq with transferExchange=true
davsclaus May 30, 2011 9:16 AM (in response to dherla)Before you send to the AMQ you put whatever you want in headers. So if there are details from the Exchange properties, then you just grab those and put in as headers.
For example using a Processor
-
6. Re: Problem - Bug with split and activemq with transferExchange=true
dherla May 30, 2011 9:28 AM (in response to davsclaus)OK but I have one more question. It's not easy for me to know the best destination (exchange property or message header) for some properties. Do you have maybe a documentation which explain the aim of the two element.
If i read the doc, i see sometimes the properties are set in the message headers like file component, sometime in exchange properties like split eip. Why we put the properties in different location ? How you decide the best position ? Have you some idea to realize the best choice ?
In my case, i have three routes. I have three exchange (one by route). Is it correct ?
Thanks in advance
Dimitri
-
7. Re: Problem - Bug with split and activemq with transferExchange=true
davsclaus May 30, 2011 10:40 AM (in response to dherla)properties are meta-data that eg EIP and whatnot put details in. And properties are kept on the Exchange during the lifecycle.
headers is part of the message. eg like HTTP headers, SOAP headers and whatnot.
-
8. Re: Problem - Bug with split and activemq with transferExchange=true
dherla May 30, 2011 10:42 AM (in response to davsclaus)Thanks a lot for your time
-
9. Re: Problem - Bug with split and activemq with transferExchange=true
davsclaus Jun 1, 2011 3:30 AM (in response to dherla)I have created a ticket to also look into fixing the transferExchange=true working out of the box with the splitter as we can check for that piece of logic that are not serializable from the splitter