amazon-web-servicesqueuerabbitmqamazon-sqs

RabbitMQ Visibility Timeout


Do RabbitMQ queues have a AWS SQS-like - "message visibility timeout" ?

From the AWS SQS documentation :

"The visibility timeout clock starts ticking once Amazon SQS returns the message. During that time, the component processes and deletes the message. But what happens if the component fails before deleting the message? If your system doesn't call DeleteMessage for that message before the visibility timeout expires, the message again becomes visible to the ReceiveMessage calls placed by the components in your system and it will be received again"


Solution

  • I believe you are looking for the RabbitMQ manual acknowledgment feature. This feature allows you get messages from the queue and once you have receive them ack'ed them. If something happens in the middle of this process, the message will be available again in the queue after a certain amount of time. Also, in the meantime since you get the message until you ack it, the message is not available for other consumers to consume.

    I think this is the same behavior as Message Visibility Timeout of SQS.