Hi I want to set x-expire time for the queues which are created in rabbit
and i am using <rabbit:queue> tag for the same. But looks like rabbit/spring takes the value as string and is not able to set this property to the queue.
I am getting this exectionCode:<rabbit:queue name="test.noConsumerQueue" auto-delete="true"> <rabbit:queue-arguments> <entry key="x-expires" value="10000"/> </rabbit:queue-arguments> </rabbit:queue>
is there a way to pass the value as int/long instead of string?Code:Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - invalid arg 'x-expires' for queue 'test.noConsumerQueue' in vhost '/': {unacceptable_type,longstr}, 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:328) at com.rabbitmq.client.impl.AMQChannel.rpc(AMQChannel.java:201) at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:125) ... 22 more Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - invalid arg 'x-expires' for queue 'test.noConsumerQueue' in vhost '/': {unacceptable_type,longstr}, class-id=50, method-id=10),null,""} at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:384) at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:235) at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:151) at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:96) at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:441) [Thread : SimpleAsyncTaskExecutor-4] 2012-05-18 10:43:03,562 INFO [org.springframework.am
Am i missing something here?
How ever i also noticed that the queue does get created in the broker, but without this argument.


Reply With Quote
