IMessageQueue

Overview

The Interface IMessageQueue interface represents a queue of serialized messages. Concrete implementations of this interface (for example in the MemoryMessageQueue class) are used by the MessageQueueManager class descemndants to manage serialized server events data.

Location


 

ClientId

Gets the client Id. Matches that clients's Session Id.

 

property ClientId: Guid read;

 

Guid ClientId { get; }

 

ReadOnly Property ClientId() As Guid

Count

Gets the number of messages currently stored in the queue.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

ReadOnly Property Count() As Int32

Lock

Prevents the current queue instance from being accessed from another threads.

To prevent race conditions in a multithread environment, the code accessing message queues should always be protected by the MessageQueue and MessageQueue methods pair.

 

method Lock

 

void Lock()

 

Sub Lock()

PeekMessage

Returns the first message in the queue, or null if the queue is empty. The message itself is not removed from the queue.

 

method PeekMessage: Stream

 

Stream PeekMessage()

 

Function PeekMessage() As Stream

PopMessage

Returns the first message in the queue. The message is removed from the queue.

 

method PopMessage: Stream

 

Stream PopMessage()

 

Function PopMessage() As Stream

QueueMessage

Stores the provided serialized event message in the queue.

 

method QueueMessage(message: Stream)

 

void QueueMessage(Stream message)

 

Sub QueueMessage(message As Stream)

Parameters:

  • message: Message instance containing serialized event data

Unlock

Unblocks the current queue instance and allows it to be accessed from another threads.

To prevent race conditions in a multithread environment, the code accessing message queues should always be protected by the MessageQueue and MessageQueue methods pair.

 

method Unlock

 

void Unlock()

 

Sub Unlock()

 

ClientId

Gets the client Id. Matches that clients's Session Id.

 

property ClientId: Guid read;

 

Guid ClientId { get; }

 

ReadOnly Property ClientId() As Guid

Count

Gets the number of messages currently stored in the queue.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

ReadOnly Property Count() As Int32

 

Lock

Prevents the current queue instance from being accessed from another threads.

To prevent race conditions in a multithread environment, the code accessing message queues should always be protected by the MessageQueue and MessageQueue methods pair.

 

method Lock

 

void Lock()

 

Sub Lock()

PeekMessage

Returns the first message in the queue, or null if the queue is empty. The message itself is not removed from the queue.

 

method PeekMessage: Stream

 

Stream PeekMessage()

 

Function PeekMessage() As Stream

PopMessage

Returns the first message in the queue. The message is removed from the queue.

 

method PopMessage: Stream

 

Stream PopMessage()

 

Function PopMessage() As Stream

QueueMessage

Stores the provided serialized event message in the queue.

 

method QueueMessage(message: Stream)

 

void QueueMessage(Stream message)

 

Sub QueueMessage(message As Stream)

Parameters:

  • message: Message instance containing serialized event data

Unlock

Unblocks the current queue instance and allows it to be accessed from another threads.

To prevent race conditions in a multithread environment, the code accessing message queues should always be protected by the MessageQueue and MessageQueue methods pair.

 

method Unlock

 

void Unlock()

 

Sub Unlock()