C# Class SevenDigital.Messaging.MessageReceiving.RabbitPolling.RabbitMqPollingNode

A pull-based, polling, blocking RabbitMQ work item queue
Inheritance: ITypedPollingNode
Show file Open project: i-e-b/SevenDigital.Messaging Class Usage Examples

Public Methods

Method Description
AddMessageType ( Type type ) : void

Add a message type that might be bound to the endpoint. This is used to rebuild endpoints in case of failure.

BlockUntilReady ( ) : bool

Advisory method: block if the queue is waiting to be populated.

Enqueue ( IPendingMessage work ) : void

Not currently implemented. Will throw an exception.

This might be useful at some point to inject test messages?

Length ( ) : int

Approximate snapshot length

RabbitMqPollingNode ( IRoutingEndpoint endpoint, IMessagingBase messagingBase, ISleepWrapper sleeper ) : System

Create a work item queue that will try to pull items from a named RabbitMQ endpoint

Stop ( ) : void

Stop receiving messages

TryDequeue ( ) : IWorkQueueItem>

Try and get an item from this queue. Success is encoded in the WQI result 'HasItem'

Private Methods

Method Description
DoubleAck ( Exception exception ) : bool
EnsureQueuesAndPollForMessage ( ) : IPendingMessage
IsMissingQueue ( Exception exception ) : bool
SleepingGetMessage ( ) : IPendingMessage
TryRebuildQueues ( ) : void

Method Details

AddMessageType() public method

Add a message type that might be bound to the endpoint. This is used to rebuild endpoints in case of failure.
public AddMessageType ( Type type ) : void
type System.Type
return void

BlockUntilReady() public method

Advisory method: block if the queue is waiting to be populated.
public BlockUntilReady ( ) : bool
return bool

Enqueue() public method

Not currently implemented. Will throw an exception.
This might be useful at some point to inject test messages?
public Enqueue ( IPendingMessage work ) : void
work IPendingMessage
return void

Length() public method

Approximate snapshot length
public Length ( ) : int
return int

RabbitMqPollingNode() public method

Create a work item queue that will try to pull items from a named RabbitMQ endpoint
public RabbitMqPollingNode ( IRoutingEndpoint endpoint, IMessagingBase messagingBase, ISleepWrapper sleeper ) : System
endpoint IRoutingEndpoint Destination endpoint to pull messages from
messagingBase IMessagingBase RabbitMQ connection provider
sleeper ISleepWrapper Sleeper to rate limit polling
return System

Stop() public method

Stop receiving messages
public Stop ( ) : void
return void

TryDequeue() public method

Try and get an item from this queue. Success is encoded in the WQI result 'HasItem'
public TryDequeue ( ) : IWorkQueueItem>
return IWorkQueueItem>