-
1. Re: When address-full-policy = BLOCK, when is the block actually released?
clebert.suconic Jul 12, 2012 7:11 PM (in response to bruceas)As soon as you consumed messages.. and Acked messages.. that's when the producer will released.. you have to consume and ack messages (not just consume)
-
2. Re: When address-full-policy = BLOCK, when is the block actually released?
bruceas Jul 12, 2012 7:22 PM (in response to clebert.suconic)I'm using AUTO_ACKNOWLEDGE...
-
3. Re: When address-full-policy = BLOCK, when is the block actually released?
clebert.suconic Jul 13, 2012 11:16 AM (in response to bruceas)Maybe you have a dead subscription? what won't free up space whatsoever.
Also... take the latest versions.
-
4. Re: When address-full-policy = BLOCK, when is the block actually released?
bruceas Jul 13, 2012 3:15 PM (in response to clebert.suconic)Hi Clebert,
Sorry, I wasn't very clear in my original description... let me clarify:
Messages *are* being cleared from the address and the block *is* being released. In general, the overall behavior is exacly what it should be (and is what I expected).
The only confusion I have is that messages appear to be cleared in "chunks":
Suppose that <max-size-bytes> is such that it can hold 100 homogeneous messages. When the producer goes to write the 101st message, the space is full and the producer gets blocked (as expected).
I then start the consumer (which reads at a slower rate than the producer). After the consumer reads one message, my expectation is that there would now be space for one message in the queue so that the block should free, and the producer would be able to write the 101st message (and then get blocked writing the 102nd message, etc.)
However, what I'm seeing is that when I start the consumer, it reads not one, but a "chunk" of messages (say 15) before the block gets released. (At which point the producer is able to write another 15 messages or so until it is blocked again).
So my question is: why does it require that 15 messages (instead of one) be read in order for the block to be released, as the messages are all exactly the same size.
Thank you very much
-
5. Re: When address-full-policy = BLOCK, when is the block actually released?
clebert.suconic Jul 13, 2012 4:08 PM (in response to bruceas)Take a look at the consumer Window Size and producer Window Size. They also play on how these things are sent between server and client. You probably need a smaller producer window size if you want an earlier release.
-
6. Re: When address-full-policy = BLOCK, when is the block actually released?
bruceas Jul 13, 2012 5:39 PM (in response to clebert.suconic)Thanks Clebert. This is exactly what I was looking for. Setting the producer-window-size to -1 gives the behavior that I was expecting.
Thanks again.
-
7. Re: When address-full-policy = BLOCK, when is the block actually released?
clebert.suconic Jul 13, 2012 8:16 PM (in response to bruceas)is it still blocking with -1? because I think with -1 you are basicall disabling flow control at the producer. I was expecting 0 to work... but I may be wrong... too much stuff to remember now
-
8. Re: When address-full-policy = BLOCK, when is the block actually released?
bruceas Jul 17, 2012 2:48 PM (in response to clebert.suconic)Hi Clebert,
Yes, with -1 you're disabling producer flow control (a producer-window-size of 0 is not valid and causes an error to be logged).
I think that with producer flow control enabled, the server will never send back more credits than would cause the max-size-bytes limit to be exceeded. So either the server is not releasing the block until producer-window-size credits have been made available, or it's releasing the block, but not (initially) sending back enough credits for the producer to add another message. Does this make sense?