You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Jonathan Robie <jo...@redhat.com> on 2010/10/22 18:06:59 UTC

qpid.max_size="3"

Currently, if you specify qpid.max_size="3", the broker accepts the 
string value, and does not convert it to the expected integer type.

I want to change this to either:

1. Reject string arguments when numeric types are accepted, or
2. Accept arguments of any type if the value can be converted to the 
expected type

Which approach is better?

Jonathan

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


Re: qpid.max_size="3"

Posted by Carl Trieloff <cc...@redhat.com>.
On 10/22/2010 02:04 PM, Ted Ross wrote:
>> I'm trying to fix both bugs. In the broker, should it reject the 
>> string value when it expects an integer, or should it do the conversion?
> Just my opinion:  The broker should use isdigit() or equivalent to 
> determine if it can convert and if so, convert.
>
> -Ted 

Agree. make the use friendly.

Carl.

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


Re: qpid.max_size="3"

Posted by Ted Ross <tr...@redhat.com>.
On 10/22/2010 01:31 PM, Jonathan Robie wrote:
> On 10/22/2010 12:22 PM, Andrew Stitcher wrote:
>
>> Where do you specify qpid.max_size?
>> Which broker are you talking about?
>
> I'm talking about the C++ implementation of the broker.
>
> On 10/22/2010 12:37 PM, Ted Ross wrote:
>
>> Is this related to https://issues.apache.org/jira/browse/QPID-2896 ?
>
> Yes:
>
> $ drain 
> "my-queue;{create:always,node:{type:queue,x-declare:{arguments:{'qpid.max_count':60}}}}" 
>
>
> Currently, there's a bug in the C++ client, which sends the string 
> "60" rather than 60.
>
> But I think there's also a bug in the broker, which accepts the string 
> as the value of qpid.max_count, but does not use this value because it 
> is of the wrong type.
>
> I'm trying to fix both bugs. In the broker, should it reject the 
> string value when it expects an integer, or should it do the conversion?
Just my opinion:  The broker should use isdigit() or equivalent to 
determine if it can convert and if so, convert.

-Ted


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


Re: qpid.max_size="3"

Posted by Jonathan Robie <jo...@redhat.com>.
On 10/22/2010 12:22 PM, Andrew Stitcher wrote:

> Where do you specify qpid.max_size?
> Which broker are you talking about?

I'm talking about the C++ implementation of the broker.

On 10/22/2010 12:37 PM, Ted Ross wrote:

> Is this related to https://issues.apache.org/jira/browse/QPID-2896 ?

Yes:

$ drain 
"my-queue;{create:always,node:{type:queue,x-declare:{arguments:{'qpid.max_count':60}}}}" 


Currently, there's a bug in the C++ client, which sends the string "60" 
rather than 60.

But I think there's also a bug in the broker, which accepts the string 
as the value of qpid.max_count, but does not use this value because it 
is of the wrong type.

I'm trying to fix both bugs. In the broker, should it reject the string 
value when it expects an integer, or should it do the conversion?

Jonathan

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


Re: qpid.max_size="3"

Posted by Ted Ross <tr...@redhat.com>.
On 10/22/2010 12:22 PM, Andrew Stitcher wrote:
> On Fri, 2010-10-22 at 12:06 -0400, Jonathan Robie wrote:
>    
>> Currently, if you specify qpid.max_size="3", the broker accepts the
>> string value, and does not convert it to the expected integer type.
>>      
> Some context might help here -
>
> Where do you specify qpid.max_size?
> Which broker are you talking about?
>
> Andrew
>
>    
Is this related to https://issues.apache.org/jira/browse/QPID-2896 ?


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


Re: qpid.max_size="3"

Posted by Andrew Stitcher <as...@redhat.com>.
On Fri, 2010-10-22 at 12:06 -0400, Jonathan Robie wrote:
> Currently, if you specify qpid.max_size="3", the broker accepts the 
> string value, and does not convert it to the expected integer type.

Some context might help here -

Where do you specify qpid.max_size?
Which broker are you talking about?

Andrew



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