-
1. Re: How to access parts of an aggregated message?
tcunning Mar 14, 2013 12:33 PM (in response to mataratones)Derek,
Not sure I'm understanding the question right - but if you do something like :
TreeMap map = (TreeMap) message.getBody().get();
You should be able to cycle through the map, where 0 contains the body of message 1, 1 contains the body of message 2, etc.
-
2. Re: How to access parts of an aggregated message?
mataratones Mar 14, 2013 12:46 PM (in response to tcunning)That's exactly what I was looking for, except when I try that exact command, I get the following:
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.TreeMap
-
3. Re: How to access parts of an aggregated message?
mataratones Mar 14, 2013 1:18 PM (in response to tcunning)I figured it out. It turned out that I was looking at the message after a colleague had reassigned the body via
final Body body = message.getBody() ; body.add(bodyMessage) ; The TreeMap cast works fine if I get it before that point.
-
4. Re: How to access parts of an aggregated message?
tcunning Mar 14, 2013 1:21 PM (in response to mataratones)Are you including the "Aggregate.AggregateDetails" message in all of the split messages you are sending? If it doesn't find that property, then the Aggregator returns the original message (first couple lines of AbstractAggregator.process(Message)) - maybe you aren't getting the proper aggregation?
EDIT : Looks like you solved it, glad it is working!