MemoryMessageQueueFactory

Creates MemoryMessageQueue components based on their descriptors.

Implements: MessageQueueFactory

Description

The MemoryMessageQueueFactory class allows you to create MemoryMessageQueue components based on their descriptors.

Important points

  • The name of the created message queue is taken from its descriptor.

Constructors

NewMemoryMessageQueueFactory

Creates a new instance of the factory.

NewMemoryMessageQueueFactory() *MemoryMessageQueueFactory

Methods

CreateQueue

Creates a message queue component and assigns its name.

(c *MemoryMessageQueueFactory) CreateQueue(ctx context.Context, name string) queues.IMessageQueue

  • ctx: context.Context - operation context.
  • name: string - name of the created message queue.
  • returns: queues.IMessageQueue - message queue.

See also