You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Graham Leggett <mi...@sharp.fm> on 2015/09/14 14:28:34 UTC

Query the maximum message size: proton c++ client

Hi all,

Before generating an expensive message and placing it on the queue, I would like to know whether this message will fit onto that queue before going to the trouble.

Is there an API call in proton with amqp 1.0  where you can check whether a message of a given size will be accepted on a queue, and if not whether this is a temporary condition (queue is full, try later) or a permanent one (queue doesn’t accept messages that big, don’t bother retrying because it won’t ever work)?

Regards,
Graham
—


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


Re: Query the maximum message size: proton c++ client

Posted by Gordon Sim <gs...@redhat.com>.
On 09/15/2015 10:54 AM, Graham Leggett wrote:
> On 15 Sep 2015, at 11:07 AM, Gordon Sim <gs...@redhat.com> wrote:
>
>> There is no standard way of doing this with AMQP 1.0 that will work for different brokers as yet.
>>
>> Though there is no simple API call, most brokers support management via messages sent/received to a specific address and.or via HTTP, so it is possible to programatically get the information you are looking for.
>>
>> At present any code will be broker specific though. What broker are you using?
>
> I plan to use qpid, but I’m designing an AMQP solution, not a broker specific solution, thus the problem.

I think you would need to solve this with a system of adapters for 
different brokers, providing a uniform facade over diverse management 
mechanisms and schemas.

The OASIS working group for AMQP has a draft of a management spec that 
covers the mechanism, but not the schema. Not sure how many brokers 
actually support that yet, but for those that do you would just need to 
massage the schemas. Most others offer very similar and simple 
mechanisms either message based or http based.

> What I am trying to avoid is a message-of-death: An entity generates a response that is too big, and is rejected from the queue. I want the entity to be able to ask “dear queue, are you willing to accept a message of X in size, because if you aren’t I’m going to fail now before doing all the work only to have that work thrown away at the end”.
>
> This is discretely separate from the queue is full scenario, where “wait longer” solves the problem. What I want to avoid is the problem where the entity waits for an event (acceptance of a too large message) that will never happen.


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


Re: Query the maximum message size: proton c++ client

Posted by Graham Leggett <mi...@sharp.fm>.
On 15 Sep 2015, at 11:07 AM, Gordon Sim <gs...@redhat.com> wrote:

> There is no standard way of doing this with AMQP 1.0 that will work for different brokers as yet.
> 
> Though there is no simple API call, most brokers support management via messages sent/received to a specific address and.or via HTTP, so it is possible to programatically get the information you are looking for.
> 
> At present any code will be broker specific though. What broker are you using?

I plan to use qpid, but I’m designing an AMQP solution, not a broker specific solution, thus the problem.

What I am trying to avoid is a message-of-death: An entity generates a response that is too big, and is rejected from the queue. I want the entity to be able to ask “dear queue, are you willing to accept a message of X in size, because if you aren’t I’m going to fail now before doing all the work only to have that work thrown away at the end”.

This is discretely separate from the queue is full scenario, where “wait longer” solves the problem. What I want to avoid is the problem where the entity waits for an event (acceptance of a too large message) that will never happen.

Regards,
Graham
—


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


Re: Query the maximum message size: proton c++ client

Posted by Gordon Sim <gs...@redhat.com>.
On 09/14/2015 01:28 PM, Graham Leggett wrote:
> Before generating an expensive message and placing it on the queue, I would like to know whether this message will fit onto that queue before going to the trouble.
>
> Is there an API call in proton with amqp 1.0  where you can check whether a message of a given size will be accepted on a queue, and if not whether this is a temporary condition (queue is full, try later) or a permanent one (queue doesn’t accept messages that big, don’t bother retrying because it won’t ever work)?

There is no standard way of doing this with AMQP 1.0 that will work for 
different brokers as yet.

Though there is no simple API call, most brokers support management via 
messages sent/received to a specific address and.or via HTTP, so it is 
possible to programatically get the information you are looking for.

At present any code will be broker specific though. What broker are you 
using?


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