Discussion:
[jboss-user] [Beginner's Corner] - How to access message body of an aggregated message?
Derek Croxton
2013-03-13 18:20:25 UTC
Permalink
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?

Derek
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/802445#802445]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Derek Croxton
2013-03-14 21:57:42 UTC
Permalink
Derek Croxton [https://community.jboss.org/people/mataratones] created the discussion

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

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

--------------------------------------------------------------
Answered in https://community.jboss.org/thread/222473 this thread.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/802802#802802]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Loading...