[rabbitmq-discuss] [Patch] .NET client: ignored params in QueueBind

Matthias Radestock matthias at rabbitmq.com
Wed Jan 19 08:14:59 GMT 2011


Matthew Sackman wrote:
> On Wed, Dec 29, 2010 at 11:30:48AM -0800, Vadim Chekan wrote:
>> So either parameters must be checked for non-null constraint, or (my
>> preference) null should be interpreted as empty parameter.
> 
> Yeah, sadly there are many such cases in both the C# and Java clients of
> this kinda thing. The one that annoys me the most is in the Java client
> in queueDeclare - the queue name must be "" rather than null, but the
> arguments map can be null. Grrrr.

There is a method to the madness...

The AMQP encoding of properties distinguishes between a null string and 
an absent string. While that distinction does not apply to AMQP method 
parameters, for consistency it might be desirable to apply the same 
principle there, and since all method parameters are mandatory a null 
value should not then be permitted. An NPE might not be the best way to 
complain about that though. Also, it does cause a problem for argument 
maps since the literal notation for an empty map is quite cumbersome. So 
as a matter of convenience, equating null with empty might be the better 
option.

> All of these need fixing - there are many such odd idiosyncratic aspects
> to the Java and .Net clients

What other idiosyncratic aspects were you thinking of?


Matthias.


More information about the rabbitmq-discuss mailing list