Beispiel #1
0
        /// <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);
        }
Beispiel #2
0
 /// <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);
 }
Beispiel #3
0
 /// <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);
 }