Пример #1
0
 public ScalingMessagePublisher(
     IQueueWrapper queueWrapper,
     IConfigurationManager configurationManager)
 {
     _queueWrapper             = queueWrapper;
     this.configurationManager = configurationManager;
 }
Пример #2
0
 public void Enqueue(Mail mail)
 {
     using (IQueueWrapper queue = _factory.CreateSender(QueueSettings.QueueName))
     {
         queue.Enqueue(QueueSettings.QueueName, mail);
     }
 }
Пример #3
0
 public void Dequeue()
 {
     using (IQueueWrapper queue = _factory.CreateReceiver(QueueSettings.QueueName))
     {
         var mail = queue.Dequeue <Mail>();
         _mailProcessor.Process(mail);
     }
 }
 public GetWidgetsMessageHandler(IQueueWrapper queueWrapper,
                                 ILogger logger,
                                 IDateTimeProvider dateTimeProvider)
 {
     this.queueWrapper     = queueWrapper;
     this.logger           = logger;
     this.dateTimeProvider = dateTimeProvider;
 }
Пример #5
0
 public MessageSubscriber(IQueueWrapper queueWrapper, ILogger logger, IConfigurationManager config, IServiceMetrics metrics,
                          IMethodInspectorManager methodInspectorManager, IContainerFacade container)
 {
     _queueWrapper           = queueWrapper;
     _logger                 = logger;
     _metrics                = metrics;
     _methodInspectorManager = methodInspectorManager;
     _container              = container;
 }
 public GetWidgetsMessageHandler(IQueueWrapper queueWrapper,
                                 ILogger logger,
                                 IDateTimeProvider dateTimeProvider,
                                 IMongoStore datastore)
 {
     this.queueWrapper     = queueWrapper;
     this.logger           = logger;
     this.dateTimeProvider = dateTimeProvider;
     this.datastore        = datastore;
 }
Пример #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Buffer" /> class.
        /// </summary>
        /// <param name="loggerFactory">The logger factory.</param>
        /// <param name="queueWrapper">The queue wrapper.</param>
        /// <param name="queueMessageSerializer">The queue message serializer.</param>
        public Buffer(
            [NotNull] ILoggerFactory loggerFactory,
            [NotNull] IQueueWrapper queueWrapper,
            [NotNull] IQueueMessageSerializer queueMessageSerializer)
        {
            this.subject = new ConcurrentBag <VersionedMessage>();

            this.queueWrapper           = queueWrapper;
            this.queueMessageSerializer = queueMessageSerializer;

            this.logger = loggerFactory.CreateLogger <Buffer>();
        }
Пример #8
0
        public RequestStore(
            IDateTimeProvider dateTimeProvider,
            IQueueWrapper queueWrapper,
            ILogger logger,
            IRequestMatcher requestMatcher,
            IConfigurationManager config,
            IBackplane backplane
            )
        {
            this.queueWrapper     = queueWrapper;
            this.logger           = logger;
            this.requestMatcher   = requestMatcher;
            this.dateTimeProvider = dateTimeProvider;

            const int defaultBusTimeoutMilliseconds = 5000;

            busTimeoutMilliseconds = config.Get("BusTimeoutMilliseconds", defaultBusTimeoutMilliseconds);

            this.backplane = backplane;
            Methods        = new List <string>();
        }
Пример #9
0
 public ActivityAuthorisationManager(IQueueWrapper queueWrapper, IConfigurationManager config, IContainerFacade container)
 {
     queue                  = queueWrapper;
     _container             = container;
     _requiresAuthorisation = config.Get("RequiresAuthorisation", true);
 }
Пример #10
0
 public MessageConsumer(IQueueWrapper <TMessage> queue, Message <TMessage> payload)
 {
     _queue  = queue;
     Payload = payload;
 }
Пример #11
0
 public ConsumingContext(IQueueWrapper <TMessage> queue, Message <TMessage> message)
 {
     _queue   = queue;
     _message = message;
 }
Пример #12
0
 public WebhookFunction(IQueueWrapper queueWrapper) =>
Пример #13
0
 public HelloMessageHandler(IQueueWrapper queueWrapper)
 {
     this.queueWrapper = queueWrapper;
 }
Пример #14
0
 public AspNetActivityAuthorisationManager(IQueueWrapper queueWrapper)
 {
     queue = queueWrapper;
 }