/// <summary> Creates an instance of the <b>RabbitMQIntegrationRequestPublisher</b> class. </summary> /// <param name="options">Eventing options</param> public RabbitMQIntegrationRequestPublisher(IOptions <RabbitMQOptions> options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } myConnection = PersistentConnection.Create(options.Value); myChannels = new ConcurrentDictionary <int, IModel>(); }
/// <summary> Creates an instance of the <b>RabbitMQIntegrationCommandSubscriber</b> class. </summary> /// <param name="options">Eventing options</param> /// <param name="serviceProvider">Service provider to create <b>IntegrationCommandHandler</b> instances</param> public RabbitMQIntegrationCommandSubscriber( IOptions <RabbitMQOptions> options, IServiceProvider serviceProvider ) { if (options == null) { throw new ArgumentNullException(nameof(options)); } myServiceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); myConnection = PersistentConnection.Create(options.Value); }