/// <summary> /// Sets the Azure Service Bus connection properties. /// </summary> /// <param name="service">The service.</param> /// <param name="config">The configuration.</param> /// <param name="channelId">The channel identifier.</param> public static void AzureServiceBusPropertiesSet(this IAzureServiceBusMessagingService service , IEnvironmentConfiguration config) { config.ServiceBusConnectionValidate(null); var connection = config.ServiceBusConnection(); service.Connection = new AzureServiceBusConnection( new ServiceBusConnectionStringBuilder(connection) , ReceiveMode.PeekLock , null); }
public static void ConfigureAzureMessaging <P>(this IAzureServiceBusMessagingService <P> component , string channelId , IEnumerable <P> priorityPartitions , IEnumerable <ResourceProfile> resourceProfiles , string connectionName , string serviceBusConnection) where P : PartitionConfig { component.ConfigureMessaging(channelId , priorityPartitions , resourceProfiles); component.AzureConn = new AzureConnection(connectionName, serviceBusConnection); }
/// <summary> /// Configures the azure messaging. /// </summary> /// <typeparam name="P">The messaging component type.</typeparam> /// <param name="component">The component.</param> /// <param name="channelId">The channel identifier.</param> /// <param name="priorityPartitions">The priority partitions.</param> /// <param name="resourceProfiles">The resource profiles.</param> /// <param name="connectionName">Name of the connection.</param> /// <param name="serviceBusConnection">The service bus connection.</param> /// <param name="defaultReceiveMode">The default receive mode.</param> /// <param name="defaultRetryPolicy">The default retry policy.</param> public static void ConfigureAzureMessaging <P>(this IAzureServiceBusMessagingService <P> component , string channelId , IEnumerable <P> priorityPartitions , IEnumerable <ResourceProfile> resourceProfiles , string connectionName , string serviceBusConnection , ReceiveMode defaultReceiveMode = ReceiveMode.PeekLock , RetryPolicy defaultRetryPolicy = null ) where P : PartitionConfig { //Set the standard properties. component.ConfigureMessaging(channelId, priorityPartitions, resourceProfiles); var sbConn = new ServiceBusConnectionStringBuilder(serviceBusConnection); component.Connection = new AzureServiceBusConnection(sbConn, defaultReceiveMode, defaultRetryPolicy); component.EntityName = connectionName; }