CallbackMessageReceiver

Wraps a message callback into IMessageReceiver

Description

The CallbackMessageReceiver class allows you to wrap message callbacks into IMessageReceiver.

Constructors

NewCallbackMessageReceiver

Creates an instance of the CallbackMessageReceiver.

NewCallbackMessageReceiver(callback func(message *MessageEnvelope, queue IMessageQueue) error) *CallbackMessageReceiver

Methods

ReceiveMessage

Receives an incoming message from the queue.
See also MessageEnvelope, IMessageQueue

(c *CallbackMessageReceiver) ReceiveMessage(message *MessageEnvelope, queue IMessageQueue) (err error)

  • envelope: MessageEnvelope - incoming message.
  • queue: IMessageQueue - queue where the message comes from.
  • returns: error - returns error if not received.