[jboss-user] [Beginner's Corner] - How to access message body of an aggregated message?

Derek Croxton do-not-reply at jboss.com
Wed Mar 13 14:20:25 EDT 2013

Derek Croxton [https://community.jboss.org/people/mataratones] created the discussion

"How to access message body of an aggregated message?"

To view the discussion, visit: https://community.jboss.org/message/802445#802445

We're using a StreamingAggregator to put several messages together, but after they're recombined, we need to extract each original body and recombine them in a different way.  It looks like the StreamingAggregator combines the message bodies in a Mapor something similar, because the results of message.getBody().get() show something like:  {0=xxx,1=yyy}.

Unfortunately, I am unable to retrieve the body as an object where I could easily get the separate messages out.  Message.getBody() is a BodyImpl object and can't be case to a MapBody or ObjectBody.  Message.getBody().get() returns a string and can't be cast to anything else easily, as far as I can tell.

I hope there is some way to retrieve the original message bodies.  I can't just split the string on the comma because there are embedded commas in the data.  Any suggestions?


Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130313/78f90ed6/attachment.html 

More information about the jboss-user mailing list