We are using an Artemis broker with clients that speak AMQP with the Qpid 
Proton library. We're trying to implement blocking on the producer as described 
here:
https://activemq.apache.org/components/artemis/documentation/latest/flow-control.html#blocking-amqp-producers

We have set both max-size-bytes and max-size-bytes-reject-threshold on the 
address:
            <max-size-bytes>1048576</max-size-bytes>
            
<max-size-bytes-reject-threshold>524288</max-size-bytes-reject-threshold>

What we expect to see: When the broker has received 
max-size-bytes-reject-threshold bytes of data, it should start rejecting 
messages.

But we aren't seeing any messages get rejected. Instead, it continues accepting 
messages until max-size-bytes have been received. The message that pushes the 
buffer over that limit is dropped. After that, our producer stops getting 
credits from the broker and is effectively blocked. However, we do lose one 
message.

I suppose we could add logic in the producer to figure out the message was 
dropped and retransmit it....but that doesn't seem like the way this is 
supposed to work. Is it? Are we doing something wrong? Has anyone successfully 
implemented blocking of AMQP producers with qpid proton without losing messages?

-Alton


Reply via email to