Delayed message in RabbitMQ

后端 未结 8 1267
别跟我提以往
别跟我提以往 2020-12-08 02:31

Is it possible to send message via RabbitMQ with some delay? For example I want to expire client session after 30 minutes, and I send a message which will be processed after

8条回答
  •  我在风中等你
    2020-12-08 02:37

    That's currently not possible. You have to store your expiration timestamps in a database or something similiar, and then have a helper program that reads those timestamps and queues a message.

    Delayed messages are an often requested feature, as they're useful in many situations. However, if your need is to expire client sessions I believe that messaging is not the ideal solution for you, and that another approach might work better.

提交回复
热议问题