Class MessageManagerFactory
The factory the system uses to retrieve IMessenger and IMessageListener implementations according to the MessageType config settings
Inheritance
Inherited Members
Namespace: LemonEdge.API.Messages
Assembly: API.dll
Syntax
public static class MessageManagerFactory
Properties
ValidMessengerTypes
Returns a list of the keys for all valid Message implementations that the system can use
Declaration
public static IEnumerable<string> ValidMessengerTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Methods
CreateListener(String, String)
Creates an IMessageListener automatically subscribed to the specified topic.
Uses the configured MessageType and MessageConnectionString settings for the type of IMessenger to create
Declaration
public static Task<IMessageListener> CreateListener(string topicName, string subscriberName)
Parameters
Type | Name | Description |
---|---|---|
System.String | topicName | The name of the topic for the listener to subscribe to |
System.String | subscriberName | The name of the service subscribing as a listener |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IMessageListener> | A task holding the newly created IMessageListener |
CreateListener(String, String, String, String)
Creates an IMessageListener automatically subscribed to the specified topic.
Declaration
public static Task<IMessageListener> CreateListener(string messengerTypeKey, string connectionString, string topic, string subscriberName)
Parameters
Type | Name | Description |
---|---|---|
System.String | messengerTypeKey | The key (Key) of the type of message service to use. [Azure] is the default LemonEdge implementation for subscribing to an Azure message bus |
System.String | connectionString | The connection string for connecting to the message service |
System.String | topic | The name of the topic for the listener to subscribe to |
System.String | subscriberName | The name of the service subscribing as a listener |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IMessageListener> | A task holding the newly created IMessageListener |
CreateMessenger(String)
Creates an IMessenger automatically subscribed to the specified topic.
Uses the configured MessageType and MessageConnectionString settings for the type of IMessenger to create
Declaration
public static Task<IMessenger> CreateMessenger(string topicName)
Parameters
Type | Name | Description |
---|---|---|
System.String | topicName | The name of the topic for the messenger to subscribe to |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IMessenger> | A task holding the newly created IMessenger |
CreateMessenger(String, String, String)
Creates an IMessenger automatically subscribed to the specified topic.
Declaration
public static Task<IMessenger> CreateMessenger(string messengerTypeKey, string connectionString, string topic)
Parameters
Type | Name | Description |
---|---|---|
System.String | messengerTypeKey | The key (Key) of the type of message service to use. [Azure] is the default LemonEdge implementation for subscribing to an Azure message bus |
System.String | connectionString | The connection string for connecting to the message service |
System.String | topic | The name of the topic for the messenger to subscribe to |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IMessenger> | A task holding the newly created IMessenger |