Scheduled/Delay messaging in Spring AMQP RabbitMq

865 views
Skip to first unread message

raghav tandon

unread,
Feb 5, 2016, 10:51:40 AM2/5/16
to rabbitmq-users

Hi Guys,


I am new to Rabbit MQ ,I have done all the setup and able to do the Messaging, but I am stuck in Scheduled/delayed Messaging. Please refer to my question :- 

http://stackoverflow.com/questions/35227845/scheduled-delay-messaging-in-spring-amqp-rabbitmq

Please help and let me know what configuration i am doing wrong.

Michael Klishin

unread,
Feb 5, 2016, 10:54:34 AM2/5/16
to rabbitm...@googlegroups.com, raghav tandon
Your code example seems to be using a direct exchange instead of the one that does scheduling.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


raghav tandon

unread,
Feb 5, 2016, 10:56:39 AM2/5/16
to rabbitmq-users, tandon...@gmail.com
Ok..so which Exchange should I be using? Basically I am looking for integration with spring AMQP

Michael Klishin

unread,
Feb 5, 2016, 11:00:53 AM2/5/16
to rabbitm...@googlegroups.com, raghav tandon
On 5 February 2016 at 18:56:42, raghav tandon (tandon...@gmail.com) wrote:
> so which Exchange should I be using?

https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/

> Basically I am looking for
> integration with spring AMQP

There is no special support for this (non-standard) exchange type in Spring AMQP but you should
be able to declare an exchange of any type and use it, and even use the Java client directly.

Both Spring AMQP and Java client have a decent amount of documentation:

http://www.rabbitmq.com/getstarted.html
http://docs.spring.io/spring-amqp/docs/1.5.3.RELEASE/reference/html/

Gary Russell

unread,
Feb 5, 2016, 11:01:57 AM2/5/16
to rabbitm...@googlegroups.com, raghav tandon
Spring AMQP doesn't have an abstraction over delay exchange so you need to declare and bind it manually.

If it already exists, and is configured properly, your publish should work ok.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send an email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raghav Tandon

unread,
Feb 5, 2016, 11:18:20 AM2/5/16
to Gary Russell, rabbitm...@googlegroups.com
Thats great :) Thanks a lot..I was searching for this in Spring. So, now I declared Exchange as x-delayed-message(from Web console) and its now delaying the message. But however I am not able to see that message in the Web console. Will it not be visible under the queue or exchange?

Michael Klishin

unread,
Feb 5, 2016, 11:22:24 AM2/5/16
to rabbitm...@googlegroups.com, Raghav Tandon, Gary Russell
On 5 February 2016 at 19:18:19, Raghav Tandon (tandon...@gmail.com) wrote:
> however I am not able to see that message in the Web console. Will
> it not be visible under the queue or exchange?

Not until it is published.

Raghav Tandon

unread,
Feb 5, 2016, 11:25:19 AM2/5/16
to Michael Klishin, rabbitm...@googlegroups.com, Gary Russell
Ok.. then I will go through how to purge these messages as and when required, if there is any REST for that.
Anyways, thanks again.. :)

Michael Klishin

unread,
Feb 5, 2016, 11:27:05 AM2/5/16
to Raghav Tandon, rabbitm...@googlegroups.com, Gary Russell
On 5 February 2016 at 19:25:17, Raghav Tandon (tandon...@gmail.com) wrote:
> Ok.. then I will go through how to purge these messages as and
> when required, if there is any REST for that.
> Anyways, thanks again.. :)

There is currently no way to purge or list delayed messages (or list messages in general) .
Reply all
Reply to author
Forward
0 new messages