qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: flow control in Broker Federation on 0.22
Date Thu, 27 Nov 2014 15:28:23 GMT
On 11/27/2014 03:09 PM, Kyrie.Gao wrote:
> Thank you Gordon! We have decided to apply setCapacity feature into our
> project, however, the way to success is always so tortuous. It seems that
> there are two set of client apis (qpid.messaging and qpid.client) and the
> way to use them are totally different. It seems that qpid.client is more
> strict to AMQP protocol?

The qpid::client API is quite tightly tied to the 0-10 version of AMQP. 
It is a deprecated API and I would strongly advise against using it. In 
fact it has been removed from the public interfaces in more recent releases.

> I can do the following steps to set its capacity by using qpid.messsaging.
>
> /Session session = connection.createSession();
> Sender sender = session.createSender(address);
> sender.setCapacity(n);/
>
> However, I cannot find out how to set capacity by using qpid.client. What I
> found in some docs about how to use it is all about the basic connection and
> sending messaging.
>
> /Session session =  connection.newSession();
> // session.createSender("amq.topic"); // compilation error for session class
> has no such interface.
> session.messageTransfer(arg::content=message, arg::destination="amq.topic");
> /
>
>
> Instead using sender, it just uses session to send out the messages. At this
> time, I notice some interfaces that are related to flow control.

The 0-10 flow control is used by receivers to limit how many messages 
they can be sent. qpidd will not use this mechanism to flow control senders.

The capacity of a sender is essentially the number of in-doubt messages. 
That is one of the benefits of using the qpid::messaging interface 
instead of qpid::client, its simpler yet provides richer functionality.

> /session.messageStop(arg::destination="amq.topic");
> session.messageSetFlowMode(arg::destination="amq.topic", arg::flowMode=1,
> arg::sync=false);/
>
> But the program throws an exception like "cannot find destination".

Yes, the broker cannot find a destination for outgoing messages - 
messages sent *by* the broker *to* the client - which is what the flow 
control methods above would operate on.


> Now I
> have no idea about how to apply flow control in qpid.client. Maybe they are
> not supported at all?
>
> I await your prompt response.
>
> Thanks,
> Kyrie
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/flow-control-in-Broker-Federation-on-0-22-tp7615885p7616894.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message