[rabbitmq-discuss] rabbitmq - simple message sending error

Matthias Reik matthias.reik at gmail.com
Fri Aug 31 20:03:08 BST 2012


Or to put it more simple:
If you already have a queue, and you try to declare it again (which is ok),
you will have to make sure that you declare it with the same parameters. As
your stack trace shows, and as Mark mentions, in your case the
x-message-ttl is the parameter that differs.

I want to take to use the occasion to ask a question in this context:
For most of the parameters this is a good approach, but for some parameters
this can be a bit annoying, especially for the HA feature, where you
specify over which servers a queue is distributed. For the TTL it's a bit
similar
At least I feel sometimes that it would be good if the queue parameters
could be adjusted at runtime, that the mirroring could be changed at
runtime, without clients requiring an update.
The current approach we have taken is that clients don't define the queues
anymore, but they are managed externally. Which is not ideal either :-( If
anyone has a good recommendation, ideas, ... I would be interested to hear
them

Cheers
Maze


On Fri, Aug 31, 2012 at 7:15 PM, Mark Fisher <markfisher at vmware.com> wrote:

> The error message is showing that you are trying to declare a Queue where
> the value for 'x-message-ttl' does not match that of an existing Queue with
> the same name ('ml2gos_events').
>
> ------------------------------
>
> *From: *"Nadeem M Nayeck" <nadeem.m.nayeck at gmail.com>
> *To: *"Discussions about RabbitMQ" <rabbitmq-discuss at lists.rabbitmq.com>
> *Sent: *Friday, August 31, 2012 12:57:51 PM
> *Subject: *[rabbitmq-discuss]  rabbitmq - simple message sending error
>
>
> hi guys
> I wrote a simple java client  sending a message to a queue on Rabbit
> I get this:
>
>
>
> org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:331)
>     at $Proxy9.queueDeclare(Unknown Source)
>     at
> org.springframework.amqp.rabbit.core.RabbitAdmin.declareQueues(RabbitAdmin.java:342)
>     at
> org.springframework.amqp.rabbit.core.RabbitAdmin.access$200(RabbitAdmin.java:46)
>     at
> org.springframework.amqp.rabbit.core.RabbitAdmin$11.doInRabbit(RabbitAdmin.java:312)
>     at
> org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:600)
>     ... 41 more
> Caused by: com.rabbitmq.client.ShutdownSignalException: channel error;
> reason: {#method<channel.close>(reply-code=406,
> reply-text=PRECONDITION_FAILED - inequivalent arg 'x-message-ttl'for queue
> 'ml2gos_events' in vhost 'OPLCPMED00': received none but current is the
> value '86400000' of type 'long', class-id=50, method-id=10), null, ""}
>     at
> com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67)
>     at
> com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33)
>     at
> com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:343)
>     at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:216)
>     at
> com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:118)
>     ... 53 more
> Caused by: com.rabbitmq.client.ShutdownSignalException: channel error;
> reason: {#method<channel.close>(reply-code=406,
> reply-text=PRECONDITION_FAILED - inequivalent arg 'x-message-ttl'for queue
> 'ml2gos_events' in vhost 'OPLCPMED00': received none but current is the
> value '86400000' of type 'long', class-id=50, method-id=10), null, ""}
>     at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:454)
>     at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:294)
>     at
> com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:144)
>     at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:91)
>     at
> com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:519)
>
>
>
> Any pointers?
>
> regards,
> Nadeem
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120831/61303db3/attachment.htm>


More information about the rabbitmq-discuss mailing list