Open manish7-thakur opened 8 years ago
up
We have the same issue
I'm having the same issue. I'm using the JMS https://www.rabbitmq.com/jms-client.html and it shows the value of x-delay
as positive, but when I fetch the messages on the RabbitMQ admin, it shows correctly.
I found out that publishing through admin with header x-delay=10000 will return correct msg with x-delay=-10000, but publishing with node.js amqplib, same message will return x-delay with positive value, after correct amount of time.
const options = { 'headers': { 'x-delay': 10000, 'x-other-type': 'some other type'}};
channel.publish(exchange, key, Buffer.from(msg), options);
how to use with the python lib of pika
As mentioned on the link https://www.rabbitmq.com/blog/2015/04/16/scheduling-messages-with-rabbitmq/
The plugin doesn't negate the value of delay provided in the header. The POC I did still shows the same positive value.
delayed-consumer processed message Hello World 1 at {x-delay=10000}