static BaseBatchMessageHandler CreateBatchMessageHandler(
            string queueName,
            ushort prefetchCount,
            IRabbitMqConnectionFactory connectionFactory,
            IStubCaller caller)
        {
            var connectionOptions = new BatchConsumerConnectionOptions
            {
                Type          = typeof(StubBaseBatchMessageHandler),
                ClientOptions = new RabbitMqClientOptions()
            };
            var loggerMock = new Mock <ILogger <StubBaseBatchMessageHandler> >();

            return(new StubBaseBatchMessageHandler(
                       caller,
                       connectionFactory,
                       new List <BatchConsumerConnectionOptions> {
                connectionOptions
            },
                       loggerMock.Object)
            {
                QueueName = queueName,
                PrefetchCount = prefetchCount
            });
        }
        private static BaseBatchMessageHandler CreateBatchMessageHandler(
            string queueName,
            ushort prefetchCount,
            TimeSpan?handlingPeriod,
            IRabbitMqConnectionFactory connectionFactory,
            IStubCaller caller,
            IEnumerable <IBatchMessageHandlingMiddleware> middlewares)
        {
            var connectionOptions  = new BatchConsumerConnectionOptions(typeof(StubBaseBatchMessageHandler), new RabbitMqServiceOptions());
            var loggingServiceMock = new Mock <ILoggingService>();

            return(new StubBaseBatchMessageHandler(
                       caller,
                       connectionFactory,
                       new List <BatchConsumerConnectionOptions> {
                connectionOptions
            },
                       middlewares,
                       loggingServiceMock.Object)
            {
                QueueName = queueName,
                PrefetchCount = prefetchCount,
                MessageHandlingPeriod = handlingPeriod
            });
        }
Ejemplo n.º 3
0
 public StubBaseBatchMessageHandler(
     IStubCaller caller,
     IRabbitMqConnectionFactory rabbitMqConnectionFactory,
     IEnumerable <BatchConsumerConnectionOptions> batchConsumerConnectionOptions,
     ILogger <StubBaseBatchMessageHandler> logger)
     : base(rabbitMqConnectionFactory, batchConsumerConnectionOptions, logger)
 {
     _caller = caller;
 }
 public StubBaseBatchMessageHandler(
     IStubCaller caller,
     IRabbitMqConnectionFactory rabbitMqConnectionFactory,
     IEnumerable <BatchConsumerConnectionOptions> batchConsumerConnectionOptions,
     IEnumerable <IBatchMessageHandlingMiddleware> batchMessageHandlingMiddlewares,
     ILoggingService loggingService)
     : base(rabbitMqConnectionFactory, batchConsumerConnectionOptions, batchMessageHandlingMiddlewares, loggingService)
 {
     _caller = caller;
 }
Ejemplo n.º 5
0
 public StubCallerDecorator(IStubCaller caller)
 {
     Caller = caller;
 }
 public StubExceptionMessageHandler(IStubCaller caller)
 {
     _caller = caller;
 }
Ejemplo n.º 7
0
 public StubAsyncMessageHandler(IStubCaller caller)
 {
     _caller = caller;
 }
 public StubNonCyclicMessageHandler(IStubCaller caller)
 {
     _caller = caller;
 }