-
1. Re: StreamMessage seems truncated
clebert.suconic Aug 27, 2010 11:48 AM (in response to steven.landers)JBoss MQ doesn't support Streaming (as far as I know).. You can just have large bodies.
How you're sending your message?
You should probably provide some code here on your post.
If you think you're hitting a bug, you should definitely share a testcase. Most likely you're doing something wrong at your stream code.
-
2. Re: StreamMessage seems truncated
steven.landers Aug 27, 2010 12:03 PM (in response to clebert.suconic)Thanks for the response!
When using JBossMQ, the object becomes a SpyStreamMessage
http://docs.jboss.org/jbossas/javadoc/4.0.4/messaging/org/jboss/mq/SpyStreamMessage.html
Currently we're doing a store-and-forward from a boxes's local queue to a shared queue.
1) Message goes into local queue (JBossMQ...we will later use HornetQ but not able to yet)
2) SpyStreamMessage is consumed by store-and-forward spring Pojo (stream contains 100% of everything at this point)
3) Using Spring's JMSTemplate to forward to HornetQ
public void send(final Message message) throws Exception{ template.send(remoteDestination, new MessageCreator(){ @Override public Message createMessage(Session sess) throws JMSException { return message; } }); }
4) HornetQStreamMessage is consumed, but now it only contains up to the first greater-than-sign. If I use a JBossMQ instead...it contains the whole message.
Maybe SpyStreamMessage is fundamentally different than later implementations of StreamMessage?
Thanks for your consideration and time,
Steven
-
3. Re: StreamMessage seems truncated
clebert.suconic Aug 27, 2010 12:09 PM (in response to steven.landers)Of course, You can't just send a SpyStreamMessage and assume it will be received.
You have to use the proper API from HornetQ.
There's no common JMS API for LargeMessage. For HornetQ you should create a regular message and set a property, as explained on the user's manual:
Look at the large messages example also
-
4. Re: StreamMessage seems truncated
timfox Aug 28, 2010 6:06 AM (in response to clebert.suconic)Clebert, a StreamMessage is a standard JMS message type, you're confusing it with large messages.
-
5. Re: StreamMessage seems truncated
clebert.suconic Aug 28, 2010 10:51 AM (in response to timfox)Duh!... Yes.. I was confusing with Streaming on large message.. thanks.
So, that means we're not accepting well a JBoss MQ JMS StreamMessage.
-
6. Re: StreamMessage seems truncated
steven.landers Aug 28, 2010 10:16 PM (in response to clebert.suconic)For now we're able to workaround by converting the SpyStreamMessage to a HornetQTextMessage prior to forwarding it. Eventually, we aim to replace the queuing on the JBossMQ servers with HornetQ as well - but we're having to take this one-step-at-a-time.
I can also get HornetQStreamMessage to work if I read the bytes off the SpyStreamMessage then use writeString to put them onto the HornetQStreamMessage - but given our limited 4k size, this seemed similar enough to the TextMessage approach. (I think the issue has to do with JBossMQ differences for readBytes/writeBytes)
Thanks for your help guys - I think I'm good on this problem for now - but let me know if you have any questions that can help.
-Steven