getQueueForChannelId static method

MessageQueue getQueueForChannelId(
  1. String channelId
)

Gets the message queue assigned to a channel id. Will create a new empty message queue if none exists and assign it to the channel id.

Implementation

static MessageQueue getQueueForChannelId(String channelId) {
  return messageQueueByChannelId.putIfAbsent(
    channelId,
    () => MessageQueue(channelId),
  );
}