mohsen saremi
mohsen saremi

Reputation: 715

Rabbit MQ delay after last message

I know there is a delay option in messages.

But I need this scenario:

How can I do something like that?

Upvotes: 0

Views: 194

Answers (1)

IMSoP
IMSoP

Reputation: 97718

From the information you've provided, this could just be part of the task processing callback in your application:

  1. A new message comes in, and triggers your callback
  2. Execute the task
  3. Acknowledge the message
  4. Run sleep(30) or whatever the equivalent is in your programming language of choice
  5. Return from the callback

As long as your entire callback operates synchronously in a single thread, the next task won't be processed until it returns.

Upvotes: 2

Related Questions