Using distributed messaging queues

A topic is a sequence of events. When a writer writes a message into the system, it is added to the end of the related topic, and the previous messages are kept the way they were, just like a queue. The readers read from the topic they have subscribed to. Many writers can write into many topics, and many readers can read from many topics. We can use the distributed messaging queues for topics.

Each topic will be a distributed messaging queue. A writer will write their messages to that queue. The message from the queue is deleted once the message is read. So for each reader, we will define a separate queue so that we can push the messages to that queue and the reader can read it from there.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy