You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Adam Chase <ad...@gmail.com> on 2009/01/26 23:31:35 UTC

varying message credit

Is there any way to take back message credit?

For example, say there are only 10 messages in a queue and I want "all
the messages".  I add 100 of credit, and get the 10 messages.  After
that, I want to take those new messages only a 1 at a time.

I see that you can set the subscriptionSettings after subscribing.
Might that be a way?

Thanks,

Adam

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: varying message credit

Posted by Carl Trieloff <cc...@redhat.com>.
yes, this is for the C++ broker. flush acts on a session level. There is 
also 'flush' on the
session, so you can get the session and call flush on it

Carl.


Adam Chase wrote:
> I am talking about the CPP broker.  I see there's a flush on the
> Session, but not the Subscription.
>
> Is that the one you mean?  Would it affect all of my subscriptions?
>
> Thanks,
>
> Adam
>
> On Mon, Jan 26, 2009 at 5:31 PM, Carl Trieloff <cc...@redhat.com> wrote:
>   
>> yes, flush. it will consume as many messages as it can based on your credit
>> and then
>> clear the credit - that is until more is issued
>>
>> Carl.
>>
>>
>> Adam Chase wrote:
>>     
>>> Is there any way to take back message credit?
>>>
>>> For example, say there are only 10 messages in a queue and I want "all
>>> the messages".  I add 100 of credit, and get the 10 messages.  After
>>> that, I want to take those new messages only a 1 at a time.
>>>
>>> I see that you can set the subscriptionSettings after subscribing.
>>> Might that be a way?
>>>
>>> Thanks,
>>>
>>> Adam
>>>
>>> ---------------------------------------------------------------------
>>> Apache Qpid - AMQP Messaging Implementation
>>> Project:      http://qpid.apache.org
>>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
>>
>>     


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: varying message credit

Posted by Gordon Sim <gs...@redhat.com>.
Adam Chase wrote:
> I am talking about the CPP broker.  I see there's a flush on the
> Session, but not the Subscription.

There are two uses of the term 'flush' in AMQP (and consequently in the 
c++ API).

There is the Session::messageFlush() session 'command' which Carl is 
referring to that flushes a subscription. Note there is also a 
Session::messageStop() command which simply asks the broker to delete 
all available credit without using the existing credit to send messages.

There is also the separate concept of flushing completion state. A flush 
'control' simply requests that the peer responds with information on the 
commands it has so far completed (without forcing it to complete all 
outstanding commands as a sync would). This is what is triggered by the 
Session::flush() call.

> Is that the one you mean?  Would it affect all of my subscriptions?
> 
> Thanks,
> 
> Adam
> 
> On Mon, Jan 26, 2009 at 5:31 PM, Carl Trieloff <cc...@redhat.com> wrote:
>> yes, flush. it will consume as many messages as it can based on your credit
>> and then
>> clear the credit - that is until more is issued
>>
>> Carl.
>>
>>
>> Adam Chase wrote:
>>> Is there any way to take back message credit?
>>>
>>> For example, say there are only 10 messages in a queue and I want "all
>>> the messages".  I add 100 of credit, and get the 10 messages.  After
>>> that, I want to take those new messages only a 1 at a time.
>>>
>>> I see that you can set the subscriptionSettings after subscribing.
>>> Might that be a way?
>>>
>>> Thanks,
>>>
>>> Adam
>>>
>>> ---------------------------------------------------------------------
>>> Apache Qpid - AMQP Messaging Implementation
>>> Project:      http://qpid.apache.org
>>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
> 


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: varying message credit

Posted by Adam Chase <ad...@gmail.com>.
I am talking about the CPP broker.  I see there's a flush on the
Session, but not the Subscription.

Is that the one you mean?  Would it affect all of my subscriptions?

Thanks,

Adam

On Mon, Jan 26, 2009 at 5:31 PM, Carl Trieloff <cc...@redhat.com> wrote:
>
> yes, flush. it will consume as many messages as it can based on your credit
> and then
> clear the credit - that is until more is issued
>
> Carl.
>
>
> Adam Chase wrote:
>>
>> Is there any way to take back message credit?
>>
>> For example, say there are only 10 messages in a queue and I want "all
>> the messages".  I add 100 of credit, and get the 10 messages.  After
>> that, I want to take those new messages only a 1 at a time.
>>
>> I see that you can set the subscriptionSettings after subscribing.
>> Might that be a way?
>>
>> Thanks,
>>
>> Adam
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: varying message credit

Posted by Carl Trieloff <cc...@redhat.com>.
yes, flush. it will consume as many messages as it can based on your 
credit and then
clear the credit - that is until more is issued

Carl.


Adam Chase wrote:
> Is there any way to take back message credit?
>
> For example, say there are only 10 messages in a queue and I want "all
> the messages".  I add 100 of credit, and get the 10 messages.  After
> that, I want to take those new messages only a 1 at a time.
>
> I see that you can set the subscriptionSettings after subscribing.
> Might that be a way?
>
> Thanks,
>
> Adam
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>   


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org