The following diagram extends the general overview of a CSN in regard to a client browser that provides client-side interaction with the system:
Now that we have seen how to implement messaging patterns in RabbitMQ, we can apply this to implement the following:
Global event handling; we can use the default exchange along with a single queue called
event_queue
. The worker nodes as illustrated in the preceding diagram will subscribe to theevent_queue
and start handling events for long-running tasks in a round-robin fashion; theCompetingReceiver
class is a proper alternative for the implementation of a point-to-point receiver on the worker nodes.Chat service; each user of the system will have a separate queue that will receive messages for that queue. You can use a variant—a point-to-point channel—to send a message from one user to the other. For group chatting, you can have a fanout or topic exchange (based on the implementation strategy) for the particular...