Skip to main content

RabbitMqServer

Assembly: ServiceStack.RabbitMq.dll
View Source
Declaration
public class RabbitMqServer : IMessageService, IDisposable

Properties

ConnectionFactory

The RabbitMQ.Client Connection factory to introspect connection properties and create a low-level connection

View Source
Declaration
public ConnectionFactory ConnectionFactory { get; }

AutoReconnect

Whether Rabbit MQ should auto-retry connecting when a connection to Rabbit MQ Server instance is dropped

View Source
Declaration
public bool AutoReconnect { get; set; }

RetryCount

How many times a message should be retried before sending to the DLQ (Max of 1).

View Source
Declaration
public int RetryCount { get; set; }

UsePolling

Whether to use polling for consuming messages instead of a long-term subscription

View Source
Declaration
public bool UsePolling { get; set; }

KeepAliveRetryAfterMs

Wait before Starting the MQ Server after a restart

View Source
Declaration
public int? KeepAliveRetryAfterMs { get; set; }

MessageFactory

View Source
Declaration
public IMessageFactory MessageFactory { get; }

MqQueueClientFilter

View Source
Declaration
public Action<RabbitMqQueueClient> MqQueueClientFilter { get; set; }

MqProducerFilter

View Source
Declaration
public Action<RabbitMqProducer> MqProducerFilter { get; set; }

PublishMessageFilter

View Source
Declaration
public Action<string, IBasicProperties, IMessage> PublishMessageFilter { get; set; }

GetMessageFilter

View Source
Declaration
public Action<string, BasicGetResult> GetMessageFilter { get; set; }

CreateQueueFilter

View Source
Declaration
public Action<string, Dictionary<string, object>> CreateQueueFilter { get; set; }

CreateTopicFilter

View Source
Declaration
public Action<string, Dictionary<string, object>> CreateTopicFilter { get; set; }

RequestFilter

Execute global transformation or custom logic before a request is processed. Must be thread-safe.

View Source
Declaration
public Func<IMessage, IMessage> RequestFilter { get; set; }

ResponseFilter

Execute global transformation or custom logic on the response. Must be thread-safe.

View Source
Declaration
public Func<object, object> ResponseFilter { get; set; }

ErrorHandler

Execute global error handler logic. Must be thread-safe.

View Source
Declaration
public Action<Exception> ErrorHandler { get; set; }

PriorityQueuesWhitelist

If you only want to enable priority queue handlers (and threads) for specific msg types

View Source
Declaration
public string[] PriorityQueuesWhitelist { get; set; }

DisablePriorityQueues

Don't listen on any Priority Queues

View Source
Declaration
public bool DisablePriorityQueues { set; }

PublishResponsesWhitelist

Opt-in to only publish responses on this white list. Publishes all responses by default.

View Source
Declaration
public string[] PublishResponsesWhitelist { get; set; }

DisablePublishingResponses

Don't publish any response messages

View Source
Declaration
public bool DisablePublishingResponses { set; }

PublishToOutqWhitelist

Opt-in to only publish .outq messages on this white list. Publishes all responses by default.

View Source
Declaration
public string[] PublishToOutqWhitelist { get; set; }

DisablePublishingToOutq

Don't publish any messages to .outq

View Source
Declaration
public bool DisablePublishingToOutq { set; }

RegisteredTypes

View Source
Declaration
public List<Type> RegisteredTypes { get; }

BgThreadCount

View Source
Declaration
public long BgThreadCount { get; }

Fields

DefaultRetryCount

View Source
Declaration
public const int DefaultRetryCount = 1

Methods

RegisterHandler<T>(Func<IMessage<T>, Object>)

View Source
Declaration
public virtual void RegisterHandler<T>(Func<IMessage<T>, object> processMessageFn)
Parameters
TypeName
System.Func<ServiceStack.Messaging.IMessage<<T>>,System.Object>processMessageFn
Type Parameters
  • T

RegisterHandler<T>(Func<IMessage<T>, Object>, Int32)

View Source
Declaration
public virtual void RegisterHandler<T>(Func<IMessage<T>, object> processMessageFn, int noOfThreads)
Parameters
TypeName
System.Func<ServiceStack.Messaging.IMessage<<T>>,System.Object>processMessageFn
System.Int32noOfThreads
Type Parameters
  • T

RegisterHandler<T>(Func<IMessage<T>, Object>, Action<IMessageHandler, IMessage<T>, Exception>)

View Source
Declaration
public virtual void RegisterHandler<T>(Func<IMessage<T>, object> processMessageFn, Action<IMessageHandler, IMessage<T>, Exception> processExceptionEx)
Parameters
TypeName
System.Func<ServiceStack.Messaging.IMessage<<T>>,System.Object>processMessageFn
System.Action<ServiceStack.Messaging.IMessageHandler,ServiceStack.Messaging.IMessage<<T>>,System.Exception>processExceptionEx
Type Parameters
  • T

RegisterHandler<T>(Func<IMessage<T>, Object>, Action<IMessageHandler, IMessage<T>, Exception>, Int32)

View Source
Declaration
public virtual void RegisterHandler<T>(Func<IMessage<T>, object> processMessageFn, Action<IMessageHandler, IMessage<T>, Exception> processExceptionEx, int noOfThreads)
Parameters
TypeName
System.Func<ServiceStack.Messaging.IMessage<<T>>,System.Object>processMessageFn
System.Action<ServiceStack.Messaging.IMessageHandler,ServiceStack.Messaging.IMessage<<T>>,System.Exception>processExceptionEx
System.Int32noOfThreads
Type Parameters
  • T

CreateMessageHandlerFactory<T>(Func<IMessage<T>, Object>, Action<IMessageHandler, IMessage<T>, Exception>)

View Source
Declaration
protected IMessageHandlerFactory CreateMessageHandlerFactory<T>(Func<IMessage<T>, object> processMessageFn, Action<IMessageHandler, IMessage<T>, Exception> processExceptionEx)
Returns

ServiceStack.Messaging.IMessageHandlerFactory

Parameters
TypeName
System.Func<ServiceStack.Messaging.IMessage<<T>>,System.Object>processMessageFn
System.Action<ServiceStack.Messaging.IMessageHandler,ServiceStack.Messaging.IMessage<<T>>,System.Exception>processExceptionEx
Type Parameters
  • T

GetStats()

View Source
Declaration
public virtual IMessageHandlerStats GetStats()
Returns

ServiceStack.Messaging.IMessageHandlerStats

GetStatus()

View Source
Declaration
public virtual string GetStatus()
Returns

System.String

GetStatsDescription()

View Source
Declaration
public virtual string GetStatsDescription()
Returns

System.String

Init()

View Source
Declaration
public virtual void Init()

Start()

View Source
Declaration
public virtual void Start()

Stop()

View Source
Declaration
public virtual void Stop()

WaitForWorkersToStop(Nullable<TimeSpan>)

View Source
Declaration
public virtual void WaitForWorkersToStop(TimeSpan? timeout = null)
Parameters
TypeName
System.Nullable<System.TimeSpan>timeout

Restart()

View Source
Declaration
public virtual void Restart()

StartWorkerThreads()

View Source
Declaration
public virtual void StartWorkerThreads()

StopWorkerThreads()

View Source
Declaration
public virtual void StopWorkerThreads()

Dispose()

View Source
Declaration
public virtual void Dispose()

Implements