bg_image
header

Subscriber

A Subscriber, in the context of a message broker or messaging system, is an entity or component that receives messages and acts upon them. While the Publisher generates messages and sends them to the message broker, the Subscriber is a part of the system that has subscribed to receive specific types of messages forwarded by the message broker.

Subscribers are recipients of messages who subscribe to particular channels, topics, or types of messages that are relevant to them. Once the message broker receives messages that match the subscription criteria of the Subscribers, it forwards those messages to the corresponding Subscribers, who can then process or respond to them.

For instance, in a messaging system, a Subscriber could be an application waiting for specific types of notifications. Once the message broker receives messages that meet those criteria, it forwards them to the respective application, which then processes or reacts to the received information.

 


Queue

A queue is a data structure that operates on the principle of 'First In, First Out' (FIFO). This means that the first element inserted into the queue is the first one to be removed.

Think of it like a real-life queue: those who arrive first are also served first. In computer science and message processing, a queue is used to store elements or messages waiting to be processed by a process, application, or system.

For instance, a message queue in a message broker works similarly. When an application sends a message, it's placed in the queue, waiting there until it's picked up and processed by another application or system. This facilitates efficient, ordered, and timed processing of messages or tasks.