Queues

This package contains interfaces and classes used to create message queues. Additionally, it contains classes used to create some specific types of message queues, such as cached and memory message queues.

Interfaces

IMessageQueue

Interface for asynchronous message queues. Not all queues may implement all the methods. Attempt to call non-supported method will result in NotImplemented exception. To verify if a specific method is supported check MessagingCapabilities.

IMessageReceive

Callback interface used to receive incoming messages.


Types

CachedMessageQueue

Message queue that caches received messages in memory to allow peek operations that may not be supported by the undelying queue.
This queue is used as a base implementation for other queues

CallbackMessageReceiver

Wraps a message callback into IMessageReceiver

LockedMessage

Data object used to store and lock incoming messages in MemoryMessageQueue.

MemoryMessageQueue

Message queue that sends and receives messages within the same process by using shared memory.
This queue is typically used for testing to mock real queues.

MessageEnvelope

Allows adding additional information to messages. A correlation id, message id, and a message type are added to the data being sent/received. Additionally, a MessageEnvelope can reference a lock token.

Side note: a MessageEnvelope’s message is stored as a buffer, so strings are converted using utf8 conversions.

MessageQueue

Abstract message queue that is used as a basis for specific message queue implementations.

MessagingCapabilities

Data object that contains the supported capabilities of a message queue. If certain capability is not supported a queue will throw a NotImplemented exception.