예제 #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;
 }