🚅Brokers
Configuring
const channelId = 'test';
// Listening to messages from clusers.
manager.broker.listen(channelId, (message) => {
console.log(`Manager received a message from ${channel}: ${message}.`);
});
// Sending messages to all clusters.
manager.broker.send(channelId, 'test');
// Sending message to cluster.
const clusterId = 1;
manager.broker.send(channelId, 'test', clusterId);const channelId = 'test';
// Listening to messages from manager.
client.cluster.broker.listen(channelId, (message: string) => {
console.log(`Client ${client.cluster.id} received a message ${message}.`);
});
// Sending message to manager.
client.cluster.broker.send(channelId, 'test');Why?
Source
Manager Sent
Client Received
Client Sent
Manage Received
Total Time #1
Total Time #2
Broker Leads For
Advantage in %
Category
Last updated