You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rajesh Khan <ra...@gmail.com> on 2013/02/25 10:03:04 UTC
Is this send behavior normal. Need help understanding getAvailable
and getUnsettled
I wanted to test the setcapacity feature of a sender. As far as I know when
this capacity is set then after a certain number of messages are sent
(which is the setcapacity number) the sender would block and not send
anymore messages until an acknowledgment is received from the
receiver.However I am experiencing something different here and was hoping
someone could explain what was going on here. I need to understand what
getAvailable and getUnsettled does
Currently I have a sender with a capacity of 3 and a receiver that will
not acknowledge
here is the code I am using
sender->send(message);
std::cout << "Sender : Available capacity " << sender->getAvailable() <<
"\n";
std::cout << "Sender : Unsettled Messages " << sender->getUnsettled() <<
"\n";
and here is the output I am getting after calling the above code 3 times
Sender : Available capacity 2 //Ok Since message has been sent
3-1 = 2
Sender : Unsettled Messages 1 //Ok One message was sent and no ack
was received for that
Sender : Available capacity 1 //Ok Since message has been sent
2-1 = 1
Sender : Unsettled Messages 1 // Isnt this suppose to be 2 now ???
Sender : Sending message with symbol MSFT with timeframe 1
Sender : Available capacity 1 //How did it even send the message
isnt it suppose to be blocked ?
Sender : Unsettled Messages 2 // Isnt this suppose to be 3 ?
Re: Is this send behavior normal. Need help understanding getAvailable
and getUnsettled
Posted by Gordon Sim <gs...@redhat.com>.
On 02/25/2013 09:03 AM, Rajesh Khan wrote:
> I wanted to test the setcapacity feature of a sender. As far as I know when
> this capacity is set then after a certain number of messages are sent
> (which is the setcapacity number) the sender would block and not send
> anymore messages until an acknowledgment is received from the
> receiver.
The sender only cares about an acknowledgement from its peer, which in
this case is the broker. Specifically the subsequent delivery of a
message from the queue to a receiving process, and the acknowledgement
of that receiving process, is not relevant to the senders unsettled
state or therefore to its capacity. Does that help?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org