-
1. Re: ConsumerWindowSize for a topic
gaohoward Dec 27, 2011 9:24 PM (in response to zenzei2k)-1 means unlimited buffer at client side. The server on request will deliver as many messages as possible to the client in one go.
-
2. Re: ConsumerWindowSize for a topic
zenzei2k Dec 27, 2011 11:50 PM (in response to gaohoward)Thanks Yong Hao Gao, so that means that the server will note wait for consumers ack for sending messages to them?
-
3. Re: ConsumerWindowSize for a topic
gaohoward Dec 28, 2011 12:06 AM (in response to zenzei2k)That's not true. This has nothing to do with message acknowledgement.
-
4. Re: ConsumerWindowSize for a topic
zenzei2k Dec 28, 2011 12:27 AM (in response to zenzei2k)I supposed it has nothing to do, but there is something I dont' understand quite well. According to the manual
Slow consumers takes significant time to process each message and it is desirable to prevent buffering messages on the client side so that they can be delivered to another consumer instead. ... To allow slow consumers, set the consumer-window-size to 0 (for no buffer at all) ... This would involve a network round trip for every message and reduce performance.
But in a topic all consumers receives all messages, so I don't understand if the ConsumerWindowSize has any effect here or not. What happens if ConsumerWindowSize is set to 0 in a topic? The server delivers one message and waits for the ack of the slow consumer to send another message but in the meanwhile sends subsequent messages to the fast cosumers?
Thanks in advance Yong Hao Gao!
-
5. Re: ConsumerWindowSize for a topic
gaohoward Dec 28, 2011 2:34 AM (in response to zenzei2k)I think regarding this parameter, all consumers are equal, no matter it consumes from a queue or a topic. If a topic's consumer has it set to 0, it has same effect as on a queue's consumer, i.e. the consumer doesn't cache any messages. The server deliver messages to consumers independently, meaning the delivery of messages to one consumer doesn't block another.
-
6. Re: ConsumerWindowSize for a topic
clebert.suconic Dec 30, 2011 2:25 PM (in response to zenzei2k)This has nothing to do with ACK.
You will receive another message as soon as you finished reading a message..
On that sense, say if you are using synchronous receiving:
// At this point the client will send a credit to the server, and the server will send a message to the client.
// you won't ever have messages buffering if you use consumer-window-size=0
message msg = consumer.receive(TIMEOUT);
-
7. Re: ConsumerWindowSize for a topic
zenzei2k Dec 30, 2011 2:41 PM (in response to clebert.suconic)Hi Clebert, thanks. So the difference with consumer-windows-size values 0 or -1 are that in the first case (value 0) the consumer will receive one message at a time (cause there is no buffer), and in the case of value -1 the consumers will continue receiveing messages although they didn't read them, I'm right?
Cause I'm trying to see if this could have something to do with the problem we talk at http://community.jboss.org/message/638463#638463 (i didn't know if you manage to read my last post in them)
Besides, happy new year to you!
-
8. Re: ConsumerWindowSize for a topic
clebert.suconic Dec 31, 2011 9:44 AM (in response to zenzei2k)-1 means ... no flow control....
That would mean.. you better receive the client faster than you can produce, otherwise you would OME (out of memory exception) the client. this is documented.
If you need some buffering on the client, use a proper size.. like 1024 * 1024 (1 M bytes), so you only buffer up to the point you won't OME.