[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Large messages broken
timfox
do-not-reply at jboss.com
Thu Apr 9 10:49:53 EDT 2009
"clebert.suconic at jboss.com" wrote :
| Also... there are a few considerations the new code will have:
|
| I - Since we are now based on streams, and not files any more.... it won't be possible to resend messages without reseting the messageBody.
|
| So.. you won' t be able to do something like:
|
| Message largeMessage = consumer1.receive(...);
| producer1.send(largeMessage); // the first one would work though
| producer2.send(largeMessage);
|
I don't see a problem there as long as we document the behaviour
anonymous wrote :
| (This would work on the server though (Bridge), as on the server we are still file based)
|
|
| II - One thing I' m not sure how to proceed yet. The user may receive a large-message and do nothing with the buffer.
|
| for (....)
| | {
| | Message msg = buffer.receive(...);
| |
| | // you read the body partially... and discover that message should just be ignored... so you only read the buffer partially. The code will go to the next message
| | }
| |
|
|
|
| Right now, I' m solving this by emptiying the buffer when the next buffer.receive() is called. But then the following would fail:
|
|
| Msg msg = consumer.receive(...);
| Msg msg2 = consumer.receve(...)
|
| msg.getBody().readWhatever(); // the buffer is gone at this point.
|
|
|
Again, I think that's acceptable as long as document the behaviour
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224727#4224727
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224727
More information about the jboss-dev-forums
mailing list