Skip to main content

IMessageService

Simple definition of an MQ Host

Assembly: ServiceStack.Interfaces.dll
View Source
Declaration
public interface IMessageService : IDisposable

Properties

MessageFactory

Factory to create consumers and producers that work with this service

View Source
Declaration
IMessageFactory MessageFactory { get; }

RegisteredTypes

Get a list of all message types registered on this MQ Host

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

Methods

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

Register DTOs and handlers the MQ Server will process

View Source
Declaration
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)

Register DTOs and handlers the MQ Server will process using specified number of threads

View Source
Declaration
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>)

Register DTOs and handlers the MQ Server will process

View Source
Declaration
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)

Register DTOs and handlers the MQ Server will process using specified number of threads

View Source
Declaration
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

GetStats()

Get Total Current Stats for all Message Handlers

View Source
Declaration
IMessageHandlerStats GetStats()
Returns

ServiceStack.Messaging.IMessageHandlerStats

GetStatus()

Get the status of the service. Potential Statuses: Disposed, Stopped, Stopping, Starting, Started

View Source
Declaration
string GetStatus()
Returns

System.String

GetStatsDescription()

Get a Stats dump

View Source
Declaration
string GetStatsDescription()
Returns

System.String

Start()

Start the MQ Host if not already started.

View Source
Declaration
void Start()

Stop()

Stop the MQ Host if not already stopped.

View Source
Declaration
void Stop()