constantlearner
constantlearner

Reputation: 5247

auto process with DLQ configuration in spring xd

1)I want to configure DLQ for my stream

 stream create --name httptest7 --definition "http |  http-client --url='''http://localhost:8080/mock-sentmessage/customers/send-email''' --httpMethod=GET | log" 
stream deploy httptest7 --properties module.*.consumer.autoBindDLQ=true

2)I have made

autoBindDLQ=true

I had one doubt if suppose spring xd fails to process my messages and post it to dlq .Will they me automatically moved to My original queue to retry or should i write a processor to move my DLQ messages to my original queue

3)Now i bring down my webservice http://localhost:8080/mock-sentmessage/customers/send-email i can see message filling in my dlq.

4)When i bring up my service up . But as per my understanding I thought from DLQ the message will be retried again when my service is up.

But From DLQ its not retried again .Any configuration I need to set for ?

As per documentation:

There is no automated mechanism provided to move dead lettered messages back to the bus queue.

Upvotes: 1

Views: 480

Answers (2)

Ali
Ali

Reputation: 69

Just so you know, You can use shovel plugin in Rabbitmq to do the movement from DLQ back to the bus queue.

Upvotes: 1

Gary Russell
Gary Russell

Reputation: 174719

I am not sure what your question is, or even if you have one; you seem to have answered your own question by quoting the documentation:

There is no automated mechanism provided to move dead lettered messages back to the bus queue.

So, no; there is no "setting" you can change.

There are a couple of things you can do - write your own code to move the messages back to the main queue from the DLQ; it would just take a few lines of Java using Spring AMQP, or in any language of your choice.

You can also use the technique described here whereby you set a message TTL on the DLQ, and configure it to route back to the main queue when the TTL expires.

Upvotes: 2

Related Questions