-
15. Re: consumer-window-size - should it be set at the server side or the client side?
newway May 2, 2013 10:51 AM (in response to clebert.suconic)If a consumer is closed than obviuosly the messages that were (potentially) buffered for it will go to other consumers and this wouldn't prove the buffering question.
I terminated each consumer that tried to approach the queue and got no messages - and all the messages were delivered.
but if I look at the output attached to my example - the handling of messages #15 looks way out of order, why wasn't it picked up earlier?
21:08:21,234 2 : Will take 3 seconds to handle message: Message #3 21:08:21,235 10 : Will take 4 seconds to handle message: Message #5 21:08:21,235 5 : Will take 8 seconds to handle message: Message #4 21:08:21,236 3 : Will take 10 seconds to handle message: Message #2 21:08:21,235 9 : Will take 3 seconds to handle message: Message #1 21:08:21,236 8 : Will take 5 seconds to handle message: Message #6 21:08:21,239 7 : Will take 6 seconds to handle message: Message #7 21:08:21,239 1 : Will take 10 seconds to handle message: Message #8 21:08:21,243 4 : Will take 7 seconds to handle message: Message #9 21:08:21,243 6 : Will take 9 seconds to handle message: Message #10 21:08:24,236 2 : Will take 5 seconds to handle message: Message #11 21:08:24,238 9 : Will take 3 seconds to handle message: Message #12 21:08:25,236 10 : Will take 2 seconds to handle message: Message #13 21:08:26,238 8 : Will take 7 seconds to handle message: Message #14 21:08:27,240 9 : Will take 8 seconds to handle message: Message #16 21:08:27,241 7 : Will take 7 seconds to handle message: Message #17 21:08:28,246 4 : Will take 10 seconds to handle message: Message #18 21:08:29,237 5 : Will take 7 seconds to handle message: Message #19 21:08:29,238 2 : Will take 10 seconds to handle message: Message #20 21:08:31,237 3 : Will take 7 seconds to handle message: Message #22 21:08:31,240 1 : Will take 6 seconds to handle message: Message #23 21:08:34,242 7 : Will take 4 seconds to handle message: Message #25 21:08:35,242 9 : Will take 1 seconds to handle message: Message #26 21:08:36,167 ************************** Messages In queue 34 21:08:36,238 5 : Will take 3 seconds to handle message: Message #27 21:08:36,243 9 : Will take 6 seconds to handle message: Message #28 21:08:37,241 10 : Will take 2 seconds to handle message: Message #15
if I will have only one consumer the messages are received with the correct order - than I think it means there are sent with the correct order, No?
-
16. Re: consumer-window-size - should it be set at the server side or the client side?
clebert.suconic May 2, 2013 11:31 AM (in response to newway)Not closed... a consumer with consumerWindowSize=0 will not buffer at all.. unless you call receive or have a message handler on it.
-
17. Re: consumer-window-size - should it be set at the server side or the client side?
newway May 5, 2013 8:26 AM (in response to clebert.suconic)OK - I hope that now my example shows what I mean.
The example create 10 consumers that handle 50 messages in the queue.
when any consumer gets nothing as a result of 'receiveNoWait()' it is paused and doesn't try to process any more messages.
after all the 10 consumers are paused - it checks if the are still messages in the queue,
if yes than a new consumer is created and it is supposed to handle all the messages that are left.
now the example runs in a loop until the queue is empty - or if 75 seconds passed and the size of the queue didn't decrease it exits.
the example fails if the queue isn't empty (which is what happened in all the times I run it).
in the result.txt file you can see an example of the output of one of the runs
-
18. Re: consumer-window-size - should it be set at the server side or the client side?
clebert.suconic May 6, 2013 1:17 PM (in response to newway)Why are you using receiveNoWait(); ... why don't you just use receive(with some timeout)... which will actually make the same effect.
receive(5000) in your test always worked for me.
I'm trying to figure out why receiveNoWait is not working on your test though.
-
20. Re: consumer-window-size - should it be set at the server side or the client side?
clebert.suconic May 6, 2013 3:21 PM (in response to clebert.suconic)1 of 1 people found this helpfulWorkaround: use receive(small timeout);
I'm committing a fix already.
Message was post edited by: Clebert Suconic (Had a typo on receive(*slow* timeout).. .supposed to be small timeout
-
21. Re: consumer-window-size - should it be set at the server side or the client side?
clebert.suconic May 6, 2013 3:48 PM (in response to clebert.suconic)I will run some tests and send a PR later today:
https://github.com/clebertsuconic/hornetq/commit/95b10e84a603929b15e6038e4e7b5945a9f7622a
Feel free if you want to try it from my branch.
-
22. Re: consumer-window-size - should it be set at the server side or the client side?
clebert.suconic May 6, 2013 5:20 PM (in response to clebert.suconic)PR sent: too bad we couldn't figure out what you meant before..
https://issues.jboss.org/browse/HORNETQ-1190 - slow consumer doesn't work with receiveImmediate
It happens! sorry about that!