/// <summary> /// Constructor for use with a Producer /// </summary> /// <param name="outBox">The outbox to store messages - use InMemoryInbox if you do not require a persistent outbox</param> /// <param name="asyncOutBox">The outbox to store messages - use InMemoryInbox if you do not require a persistent outbox</param> /// <param name="producer">The Message producer</param> /// <param name="asyncProducer">The Message producer's async interface</param> public BrighterMessaging(IAmAnOutbox <Message> outBox, IAmAnOutboxAsync <Message> asyncOutBox, IAmAMessageProducer producer, IAmAMessageProducerAsync asyncProducer) { OutBox = outBox; AsyncOutBox = asyncOutBox; Producer = producer; AsyncProducer = asyncProducer; }
/// <summary> /// Constructor for use with a Producer /// </summary> /// <param name="outBox">The outbox to store messages - use InMemoryInbox if you do not require a persistent outbox</param> /// <param name="asyncOutBox">The outbox to store messages - use InMemoryInbox if you do not require a persistent outbox</param> /// <param name="producer">The Message producer</param> /// <param name="asyncProducer">The Message producer's async interface</param> /// <param name="useRequestReplyQueues">Use Request Reply Queues - This will need to set a Channel Factory as well.</param> public BrighterMessaging(IAmAnOutbox <Message> outBox, IAmAnOutboxAsync <Message> asyncOutBox, IAmAMessageProducer producer, IAmAMessageProducerAsync asyncProducer, bool useRequestReplyQueues = true) { OutBox = outBox; AsyncOutBox = asyncOutBox; Producer = producer; AsyncProducer = asyncProducer; UseRequestReplyQueues = useRequestReplyQueues; }
/// <summary> /// The <see cref="CommandProcessor"/> wants to support <see cref="CommandProcessor.Post{T}(T)"/> or <see cref="CommandProcessor.Repost"/> using Task Queues. /// You need to provide a policy to specify how QoS issues, specifically <see cref="CommandProcessor.RETRYPOLICY "/> or <see cref="CommandProcessor.CIRCUITBREAKER "/> /// are handled by adding appropriate <see cref="Policies"/> when choosing this option. /// /// </summary> /// <param name="configuration">The Task Queues configuration.</param> /// <returns>INeedARequestContext.</returns> public INeedARequestContext TaskQueues(MessagingConfiguration configuration) { _useTaskQueues = true; _messageStore = configuration.MessageStore; _asyncMessageStore = configuration.AsyncMessageStore; _messagingGateway = configuration.MessageProducer; _asyncMessagingGateway = configuration.AsyncMessageProducer; _messageMapperRegistry = configuration.MessageMapperRegistry; _messageStoreWriteTimeout = configuration.MessageStoreWriteTimeout; _messagingGatewaySendTimeout = configuration.MessagingGatewaySendTimeout; return(this); }
/// <summary> /// The <see cref="CommandProcessor"/> wants to support <see cref="CommandProcessor.Call{T}(T)"/> using RPC between client and server /// </summary> /// <param name="messagingConfiguration"></param> /// <returns></returns> public INeedARequestContext RequestReplyQueues(MessagingConfiguration configuration) { _useRequestReplyQueues = true; _messagingGateway = configuration.MessageProducer; _asyncMessagingGateway = configuration.MessageProducerAsync; _messageMapperRegistry = configuration.MessageMapperRegistry; _outboxWriteTimeout = configuration.OutboxWriteTimeout; _messagingGatewaySendTimeout = configuration.MessagingGatewaySendTimeout; _responseChannelFactory = configuration.ResponseChannelFactory; return(this); }
/// <summary> /// Simplified constructor - we /// </summary> /// <param name="outbox">The outbox</param> /// <param name="producer">Producer</param> public BrighterMessaging(IAmAnOutbox <Message> outbox, IAmAMessageProducer producer) { OutBox = outbox; if (outbox is IAmAnOutboxAsync <Message> outboxAsync) { AsyncOutBox = outboxAsync; } Producer = producer; if (producer is IAmAMessageProducerAsync producerAsync) { AsyncProducer = producerAsync; } }
/// <summary> /// Initializes a new instance of the <see cref="CommandProcessor"/> class. /// Use this constructor when only task queue support is required /// </summary> /// <param name="requestContextFactory">The request context factory.</param> /// <param name="policyRegistry">The policy registry.</param> /// <param name="mapperRegistry">The mapper registry.</param> /// <param name="asyncMessageStore">The message store supporting async/await.</param> /// <param name="asyncMessageProducer">The messaging gateway supporting async/await.</param> /// <param name="messageStoreTimeout">How long should we wait to write to the message store</param> public CommandProcessor( IAmARequestContextFactory requestContextFactory, IAmAPolicyRegistry policyRegistry, IAmAMessageMapperRegistry mapperRegistry, IAmAMessageStoreAsync <Message> asyncMessageStore, IAmAMessageProducerAsync asyncMessageProducer, int messageStoreTimeout = 300 ) : this( requestContextFactory, policyRegistry, mapperRegistry, asyncMessageStore, asyncMessageProducer, LogProvider.GetCurrentClassLogger(), messageStoreTimeout) { }
/// <summary> /// Initializes a new instance of the <see cref="MessagingConfiguration"/> class. /// </summary> /// <param name="asyncMessageProducer">The messaging gateway that supports async/await.</param> /// <param name="messageMapperRegistry">The message mapper registry.</param> /// <param name="outboxWriteTimeout">How long to wait when writing to the outbox</param> /// <param name="messagingGatewaySendTimeout">How long to wait when sending via the gateway</param> /// <param name="useInbox">Do we want to create an inbox globally i.e. on every handler (as opposed to by hand). Defaults to null, by hand</param> public MessagingConfiguration( IAmAMessageProducerAsync asyncMessageProducer, IAmAMessageMapperRegistry messageMapperRegistry, int outboxWriteTimeout = 300, int messagingGatewaySendTimeout = 300, InboxConfiguration useInbox = null ) { MessageProducerAsync = asyncMessageProducer; MessageMapperRegistry = messageMapperRegistry; OutboxWriteTimeout = outboxWriteTimeout; MessagingGatewaySendTimeout = messagingGatewaySendTimeout; UseInbox = useInbox; }
/// <summary> /// Initializes a new instance of the <see cref="MessagingConfiguration"/> class. /// </summary> /// <param name="asyncMessageStore">The message store that supports async/await.</param> /// <param name="asyncmessageProducer">The messaging gateway that supports async/await.</param> /// <param name="messageMapperRegistry">The message mapper registry.</param> /// <param name="messageStoreWriteTimeout">How long to wait when writing to the message store</param> /// <param name="messagingGatewaySendTimeout">How long to wait when sending via the gateway</param> public MessagingConfiguration( IAmAMessageStoreAsync <Message> asyncMessageStore, IAmAMessageProducerAsync asyncmessageProducer, IAmAMessageMapperRegistry messageMapperRegistry, int messageStoreWriteTimeout = 300, int messagingGatewaySendTimeout = 300 ) { AsyncMessageStore = asyncMessageStore; AsyncMessageProducer = asyncmessageProducer; MessageMapperRegistry = messageMapperRegistry; MessageStoreWriteTimeout = messageStoreWriteTimeout; MessagingGatewaySendTimeout = messagingGatewaySendTimeout; }
/// <summary> /// The <see cref="CommandProcessor"/> wants to support <see cref="CommandProcessor.Post{T}(T)"/> or <see cref="CommandProcessor.Repost"/> using Task Queues. /// You need to provide a policy to specify how QoS issues, specifically <see cref="CommandProcessor.RETRYPOLICY "/> or <see cref="CommandProcessor.CIRCUITBREAKER "/> /// are handled by adding appropriate <see cref="Policies"/> when choosing this option. /// /// </summary> /// <param name="configuration">The Task Queues configuration.</param> /// <returns>INeedARequestContext.</returns> public INeedARequestContext TaskQueues(MessagingConfiguration configuration, IAmAnOutbox <Message> outbox) { _useTaskQueues = true; _messagingGateway = configuration.MessageProducer; _outbox = outbox; if (outbox is IAmAnOutboxAsync <Message> ) { _asyncOutbox = (IAmAnOutboxAsync <Message>)outbox; } _asyncMessagingGateway = configuration.MessageProducerAsync; _messageMapperRegistry = configuration.MessageMapperRegistry; _outboxWriteTimeout = configuration.OutboxWriteTimeout; _messagingGatewaySendTimeout = configuration.MessagingGatewaySendTimeout; return(this); }
/// <summary> /// Initializes a new instance of the <see cref="CommandProcessor"/> class. /// Use this constructor when only task queue support is required /// </summary> /// <param name="requestContextFactory">The request context factory.</param> /// <param name="policyRegistry">The policy registry.</param> /// <param name="mapperRegistry">The mapper registry.</param> /// <param name="asyncMessageStore">The message store supporting async/await.</param> /// <param name="asyncMessageProducer">The messaging gateway supporting async/await.</param> /// <param name="messageStoreTimeout">How long should we wait to write to the message store</param> public CommandProcessor( IAmARequestContextFactory requestContextFactory, IAmAPolicyRegistry policyRegistry, IAmAMessageMapperRegistry mapperRegistry, IAmAMessageStoreAsync <Message> asyncMessageStore, IAmAMessageProducerAsync asyncMessageProducer, int messageStoreTimeout = 300) { _requestContextFactory = requestContextFactory; _policyRegistry = policyRegistry; _messageStoreTimeout = messageStoreTimeout; _mapperRegistry = mapperRegistry; _asyncMessageStore = asyncMessageStore; _asyncMessageProducer = asyncMessageProducer; }
/// <summary> /// Initializes a new instance of the <see cref="CommandProcessor"/> class. /// Use this constructor when both task queue and command processor support is required /// </summary> /// <param name="subscriberRegistry">The subscriber registry.</param> /// <param name="asyncHandlerFactory">The async handler factory.</param> /// <param name="requestContextFactory">The request context factory.</param> /// <param name="policyRegistry">The policy registry.</param> /// <param name="mapperRegistry">The mapper registry.</param> /// <param name="asyncMessageStore">The message store supporting async/await.</param> /// <param name="asyncMessageProducer">The messaging gateway supporting async/await.</param> /// <param name="messageStoreTimeout">How long should we wait to write to the message store</param> public CommandProcessor( IAmASubscriberRegistry subscriberRegistry, IAmAHandlerFactoryAsync asyncHandlerFactory, IAmARequestContextFactory requestContextFactory, IAmAPolicyRegistry policyRegistry, IAmAMessageMapperRegistry mapperRegistry, IAmAMessageStoreAsync <Message> asyncMessageStore, IAmAMessageProducerAsync asyncMessageProducer, int messageStoreTimeout = 300 ) : this( subscriberRegistry, asyncHandlerFactory, requestContextFactory, policyRegistry, mapperRegistry, asyncMessageStore, asyncMessageProducer, LogProvider.For <CommandProcessor>(), messageStoreTimeout) { }
/// <summary> /// Initializes a new instance of the <see cref="CommandProcessor"/> class. /// Use this constructor when both task queue and command processor support is required /// </summary> /// <param name="subscriberRegistry">The subscriber registry.</param> /// <param name="asyncHandlerFactory">The async handler factory.</param> /// <param name="requestContextFactory">The request context factory.</param> /// <param name="policyRegistry">The policy registry.</param> /// <param name="mapperRegistry">The mapper registry.</param> /// <param name="asyncMessageStore">The message store supporting async/await.</param> /// <param name="asyncMessageProducer">The messaging gateway supporting async/await.</param> /// <param name="messageStoreTimeout">How long should we wait to write to the message store</param> /// <param name="messageGatewaySendTimeout">How long should we wait to post to the message store</param> public CommandProcessor( IAmASubscriberRegistry subscriberRegistry, IAmAHandlerFactoryAsync asyncHandlerFactory, IAmARequestContextFactory requestContextFactory, IAmAPolicyRegistry policyRegistry, IAmAMessageMapperRegistry mapperRegistry, IAmAMessageStoreAsync <Message> asyncMessageStore, IAmAMessageProducerAsync asyncMessageProducer, int messageStoreTimeout = 300, int messageGatewaySendTimeout = 300 ) : this( subscriberRegistry, asyncHandlerFactory, requestContextFactory, policyRegistry, mapperRegistry, asyncMessageStore, asyncMessageProducer, LogProvider.GetCurrentClassLogger()) { }
/// <summary> /// Initializes a new instance of the <see cref="CommandProcessor"/> class. /// Use this constructor when both task queue and command processor support is required /// </summary> /// <param name="subscriberRegistry">The subscriber registry.</param> /// <param name="asyncHandlerFactory">The async handler factory.</param> /// <param name="requestContextFactory">The request context factory.</param> /// <param name="policyRegistry">The policy registry.</param> /// <param name="mapperRegistry">The mapper registry.</param> /// <param name="asyncMessageStore">The message store supporting async/await.</param> /// <param name="asyncMessageProducer">The messaging gateway supporting async/await.</param> /// <param name="messageStoreTimeout">How long should we wait to write to the message store</param> public CommandProcessor( IAmASubscriberRegistry subscriberRegistry, IAmAHandlerFactoryAsync asyncHandlerFactory, IAmARequestContextFactory requestContextFactory, IAmAPolicyRegistry policyRegistry, IAmAMessageMapperRegistry mapperRegistry, IAmAMessageStoreAsync <Message> asyncMessageStore, IAmAMessageProducerAsync asyncMessageProducer, int messageStoreTimeout = 300) : this(subscriberRegistry, asyncHandlerFactory, requestContextFactory, policyRegistry) { _mapperRegistry = mapperRegistry; _asyncMessageStore = asyncMessageStore; _asyncMessageProducer = asyncMessageProducer; _messageStoreTimeout = messageStoreTimeout; }
/// <summary> /// Initializes a new instance of the <see cref="MessagingConfiguration"/> class. /// </summary> /// <param name="outboxAsync">The OutBox which supports async/await.</param> /// <param name="asyncmessageProducer">The messaging gateway that supports async/await.</param> /// <param name="messageMapperRegistry">The message mapper registry.</param> /// <param name="messageStoreWriteTimeout">How long to wait when writing to the message store</param> /// <param name="messagingGatewaySendTimeout">How long to wait when sending via the gateway</param> /// <param name="useInbox">Do we want to create an inbox globally i.e. on every handler (as opposed to by hand). Defaults to null, by hand</param> public MessagingConfiguration( IAmAnOutboxAsync <Message> outboxAsync, IAmAMessageProducerAsync asyncmessageProducer, IAmAMessageMapperRegistry messageMapperRegistry, int messageStoreWriteTimeout = 300, int messagingGatewaySendTimeout = 300, InboxConfiguration useInbox = null ) { OutboxAsync = outboxAsync; MessageProducerAsync = asyncmessageProducer; MessageMapperRegistry = messageMapperRegistry; MessageStoreWriteTimeout = messageStoreWriteTimeout; MessagingGatewaySendTimeout = messagingGatewaySendTimeout; UseInbox = useInbox; }
/// <summary> /// Initializes a new instance of the <see cref="CommandProcessor"/> class. /// Use this constructor when only task queue support is required /// </summary> /// <param name="requestContextFactory">The request context factory.</param> /// <param name="policyRegistry">The policy registry.</param> /// <param name="mapperRegistry">The mapper registry.</param> /// <param name="asyncMessageStore">The message store supporting async/await.</param> /// <param name="asyncMessageProducer">The messaging gateway supporting async/await.</param> /// <param name="messageStoreTimeout">How long should we wait to write to the message store</param> /// <param name="featureSwitchRegistry">The feature switch config provider.</param> public CommandProcessor( IAmARequestContextFactory requestContextFactory, IPolicyRegistry <string> policyRegistry, IAmAMessageMapperRegistry mapperRegistry, IAmAMessageStoreAsync <Message> asyncMessageStore, IAmAMessageProducerAsync asyncMessageProducer, int messageStoreTimeout = 300, IAmAFeatureSwitchRegistry featureSwitchRegistry = null) { _requestContextFactory = requestContextFactory; _policyRegistry = policyRegistry; _messageStoreTimeout = messageStoreTimeout; _mapperRegistry = mapperRegistry; _asyncMessageStore = asyncMessageStore; _asyncMessageProducer = asyncMessageProducer; _featureSwitchRegistry = featureSwitchRegistry; }
/// <summary> /// Initializes a new instance of the <see cref="MessagingConfiguration"/> class. /// </summary> /// <param name="outBox">The OutBox.</param> /// <param name="asyncOutbox">The OutBox that supports async/await.</param> /// <param name="messageProducer">The messaging gateway.</param> /// <param name="asyncmessageProducer">The messaging gateway that supports async/await.</param> /// <param name="messageMapperRegistry">The message mapper registry.</param> /// <param name="messageStoreWriteTimeout">How long to wait when writing to the message store</param> /// <param name="messagingGatewaySendTimeout">How long to wait when sending via the gateway</param> public MessagingConfiguration( IAmAnOutbox <Message> outBox, IAmAnOutboxAsync <Message> asyncOutbox, IAmAMessageProducer messageProducer, IAmAMessageProducerAsync asyncmessageProducer, IAmAMessageMapperRegistry messageMapperRegistry, int messageStoreWriteTimeout = 300, int messagingGatewaySendTimeout = 300 ) { OutBox = outBox; AsyncOutbox = asyncOutbox; MessageProducer = messageProducer; AsyncMessageProducer = asyncmessageProducer; MessageMapperRegistry = messageMapperRegistry; MessageStoreWriteTimeout = messageStoreWriteTimeout; MessagingGatewaySendTimeout = messagingGatewaySendTimeout; }
/// <summary> /// Initializes a new instance of the <see cref="CommandProcessor"/> class. /// Use this constructor when both task queue and command processor support is required /// </summary> /// <param name="subscriberRegistry">The subscriber registry.</param> /// <param name="asyncHandlerFactory">The async handler factory.</param> /// <param name="requestContextFactory">The request context factory.</param> /// <param name="policyRegistry">The policy registry.</param> /// <param name="mapperRegistry">The mapper registry.</param> /// <param name="asyncMessageStore">The message store supporting async/await.</param> /// <param name="asyncMessageProducer">The messaging gateway supporting async/await.</param> /// <param name="messageStoreTimeout">How long should we wait to write to the message store</param> /// <param name="featureSwitchRegistry">The feature switch config provider.</param> public CommandProcessor( IAmASubscriberRegistry subscriberRegistry, IAmAHandlerFactoryAsync asyncHandlerFactory, IAmARequestContextFactory requestContextFactory, IPolicyRegistry <string> policyRegistry, IAmAMessageMapperRegistry mapperRegistry, IAmAMessageStoreAsync <Message> asyncMessageStore, IAmAMessageProducerAsync asyncMessageProducer, int messageStoreTimeout = 300, IAmAFeatureSwitchRegistry featureSwitchRegistry = null) : this(subscriberRegistry, asyncHandlerFactory, requestContextFactory, policyRegistry, featureSwitchRegistry) { _mapperRegistry = mapperRegistry; _asyncMessageStore = asyncMessageStore; _asyncMessageProducer = asyncMessageProducer; _messageStoreTimeout = messageStoreTimeout; _featureSwitchRegistry = featureSwitchRegistry; }
protected virtual void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { _messageProducer?.Dispose(); _asyncMessageProducer?.Dispose(); } _messageProducer = null; _asyncMessageProducer = null; _disposed = true; }
/// <summary> /// Initializes a new instance of the <see cref="CommandProcessor"/> class. /// Use this constructor when only task queue support is required /// </summary> /// <param name="requestContextFactory">The request context factory.</param> /// <param name="policyRegistry">The policy registry.</param> /// <param name="mapperRegistry">The mapper registry.</param> /// <param name="asyncOutbox">The outbox supporting async/await.</param> /// <param name="asyncMessageProducer">The messaging gateway supporting async/await.</param> /// <param name="outboxTimeout">How long should we wait to write to the outbox</param> /// <param name="featureSwitchRegistry">The feature switch config provider.</param> /// <param name="inboxConfiguration">Do we want to insert an inbox handler into pipelines without the attribute. Null (default = no), yes = how to configure</param> public CommandProcessor( IAmARequestContextFactory requestContextFactory, IPolicyRegistry <string> policyRegistry, IAmAMessageMapperRegistry mapperRegistry, IAmAnOutboxAsync <Message> asyncOutbox, IAmAMessageProducerAsync asyncMessageProducer, int outboxTimeout = 300, IAmAFeatureSwitchRegistry featureSwitchRegistry = null, InboxConfiguration inboxConfiguration = null) { _requestContextFactory = requestContextFactory; _policyRegistry = policyRegistry; _outboxTimeout = outboxTimeout; _mapperRegistry = mapperRegistry; _asyncOutbox = asyncOutbox; _asyncMessageProducer = asyncMessageProducer; _featureSwitchRegistry = featureSwitchRegistry; _inboxConfiguration = inboxConfiguration; }
/// <summary> /// Initializes a new instance of the <see cref="CommandProcessor"/> class. /// Use this constructor when both task queue and command processor support is required, and you want to inject a test logger /// </summary> /// <param name="subscriberRegistry">The subscriber registry.</param> /// <param name="handlerFactory">The handler factory.</param> /// <param name="asyncHandlerFactory">The async handler factory.</param> /// <param name="requestContextFactory">The request context factory.</param> /// <param name="policyRegistry">The policy registry.</param> /// <param name="mapperRegistry">The mapper registry.</param> /// <param name="outBox">The outbox.</param> /// <param name="asyncOutbox">The outbox supporting async/await.</param> /// <param name="messageProducer">The messaging gateway.</param> /// <param name="asyncMessageProducer">The messaging gateway supporting async/await.</param> /// <param name="outboxTimeout">How long should we wait to write to the outbox</param> /// <param name="featureSwitchRegistry">The feature switch config provider.</param> /// <param name="inboxConfiguration">Do we want to insert an inbox handler into pipelines without the attribute. Null (default = no), yes = how to configure</param> public CommandProcessor( IAmASubscriberRegistry subscriberRegistry, IAmAHandlerFactory handlerFactory, IAmAHandlerFactoryAsync asyncHandlerFactory, IAmARequestContextFactory requestContextFactory, IPolicyRegistry <string> policyRegistry, IAmAMessageMapperRegistry mapperRegistry, IAmAnOutbox <Message> outBox, IAmAnOutboxAsync <Message> asyncOutbox, IAmAMessageProducer messageProducer, IAmAMessageProducerAsync asyncMessageProducer, int outboxTimeout = 300, IAmAFeatureSwitchRegistry featureSwitchRegistry = null, InboxConfiguration inboxConfiguration = null) : this(subscriberRegistry, handlerFactory, asyncHandlerFactory, requestContextFactory, policyRegistry, featureSwitchRegistry) { _mapperRegistry = mapperRegistry; _outBox = outBox; _asyncOutbox = asyncOutbox; _messageProducer = messageProducer; _asyncMessageProducer = asyncMessageProducer; _outboxTimeout = outboxTimeout; _inboxConfiguration = inboxConfiguration; }
/// <summary> /// The <see cref="CommandProcessor"/> wants to support <see cref="CommandProcessor.Post{T}(T)"/> or <see cref="CommandProcessor.Repost"/> using Task Queues. /// You need to provide a policy to specify how QoS issues, specifically <see cref="CommandProcessor.RETRYPOLICY "/> or <see cref="CommandProcessor.CIRCUITBREAKER "/> /// are handled by adding appropriate <see cref="Policies"/> when choosing this option. /// /// </summary> /// <param name="configuration">The Task Queues configuration.</param> /// <returns>INeedARequestContext.</returns> public INeedARequestContext TaskQueues(MessagingConfiguration configuration) { _useTaskQueues = true; _messageStore = configuration.MessageStore; _asyncMessageStore = configuration.AsyncMessageStore; _messagingGateway = configuration.MessageProducer; _asyncMessagingGateway = configuration.AsyncMessageProducer; _messageMapperRegistry = configuration.MessageMapperRegistry; _messageStoreWriteTimeout = configuration.MessageStoreWriteTimeout; _messagingGatewaySendTimeout = configuration.MessagingGatewaySendTimeout; return this; }
/// <summary> /// Initializes a new instance of the <see cref="MessagingConfiguration"/> class. /// </summary> /// <param name="messageStore">The message store.</param> /// <param name="asyncMessageStore">The message store that supports async/await.</param> /// <param name="messageProducer">The messaging gateway.</param> /// <param name="asyncmessageProducer">The messaging gateway that supports async/await.</param> /// <param name="messageMapperRegistry">The message mapper registry.</param> /// <param name="messageStoreWriteTimeout">How long to wait when writing to the message store</param> /// <param name="messagingGatewaySendTimeout">How long to wait when sending via the gateway</param> public MessagingConfiguration( IAmAMessageStore<Message> messageStore, IAmAMessageStoreAsync<Message> asyncMessageStore, IAmAMessageProducer messageProducer, IAmAMessageProducerAsync asyncmessageProducer, IAmAMessageMapperRegistry messageMapperRegistry, int messageStoreWriteTimeout = 300, int messagingGatewaySendTimeout = 300 ) { MessageStore = messageStore; AsyncMessageStore = asyncMessageStore; MessageProducer = messageProducer; AsyncMessageProducer = asyncmessageProducer; MessageMapperRegistry = messageMapperRegistry; MessageStoreWriteTimeout = messageStoreWriteTimeout; MessagingGatewaySendTimeout = messagingGatewaySendTimeout; }