Hacker News new | ask | show | jobs
by juliangregorian 4077 days ago
What does this do that I can't get from plain Redis Pub Sub?
1 comments

This is a lot more than pub/sub.

A message queue stores messages so that nothing gets lost, when there are no subscribers listening.

A new message will be delivered to only one recipient at a time while in a pub/sub system all subscribers would receive a message and would either all work on the same message/job or would have to decide who does what.

Whoever receives a message will "work" on that message and after success will delete the message. Usually within seconds. So no one will ever receive that message again. If a receiving process crashes or some error happens the message will just pop up again and will be received again after a set invisibility time (default is 30s).

So dropping messages in this message queue keeps them there until some receiver(s) delete them. It does not matter how many message producers / consumers there are. The queue handles the problem of not delivering a message to two consumers within a set time.