[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Large messages broken
clebert.suconic@jboss.com
do-not-reply at jboss.com
Thu Apr 9 08:33:31 EDT 2009
I *really* tried finishing it by yesterday... but I had issues with FlowControl and MessageConsumers.
The message eventually stops being consumed in some scenarios.
I have everything else working.. including Failover that only failed on the Consumer cases.
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);
(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.
If we don' t do this, we would need to force the user to read or programatically throw the buffer away.
Any thoughts about II?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224669#4224669
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224669
More information about the jboss-dev-forums
mailing list