internal AzureStorageQueueBuilder()
 {
     _settings                    = new AzureStorageQueueSettings();
     _messageTimeoutPolicy        = new MessageTimeoutPolicy();
     _poisonMessageBehaviorPolicy = new PoisonMessageBehaviorPolicy();
     _customStringSerializer      = null;
     _customBinarySerializer      = null;
 }
Ejemplo n.º 2
0
 internal AzureStorageQueue(
     IMessageConsumerSettings settings,
     IMessageTimeoutPolicy messageTimeoutPolicy,
     IPoisonMessageBehaviorPolicy poisonMessageBehaviorPolicy = null,
     IStringMessageSerializer <T> customStringSerializer      = null,
     IBinaryMessageSerializer <T> customBinarySerializer      = null)
 {
     _settings                    = settings;
     _messageTimeoutPolicy        = messageTimeoutPolicy;
     _poisonMessageBehaviorPolicy = poisonMessageBehaviorPolicy;
     _customStringSerializer      = customStringSerializer;
     _customBinarySerializer      = customBinarySerializer;
 }
Ejemplo n.º 3
0
 public static async Task <AzureStorageQueue <T> > CreateAsync(
     IMessageConsumerSettings settings,
     IMessageTimeoutPolicy messageTimeoutPolicy,
     IPoisonMessageBehaviorPolicy poisonMessageBehaviorPolicy,
     IStringMessageSerializer <T> customStringSerializer,
     IBinaryMessageSerializer <T> customBinarySerializer)
 {
     return(await CreateAsync(settings,
                              messageTimeoutPolicy,
                              poisonMessageBehaviorPolicy,
                              customStringSerializer,
                              customBinarySerializer,
                              CancellationToken.None));
 }
Ejemplo n.º 4
0
 internal MessageConsumer(
     IMessageConsumerSettings settings,
     IAzureStorageQueue <T> queue,
     IMessageConsumerQueuePolingPolicy queuePolingPolicy,
     IMessageHandler <T> messageHandler,
     IMessageHandler <T> failedMessageHandler,
     IMessageExceptionHandler <T> exceptionHandler
     )
 {
     _settings             = settings ?? throw new ArgumentNullException(nameof(settings));
     _queue                = queue ?? throw new ArgumentNullException(nameof(queue));
     _queuePolingPolicy    = queuePolingPolicy ?? throw new ArgumentNullException(nameof(queue));
     _messageHandler       = messageHandler ?? throw new ArgumentNullException(nameof(messageHandler));
     _failedMessageHandler = failedMessageHandler;
     _exceptionHandler     = exceptionHandler;
 }
Ejemplo n.º 5
0
        public static async Task <AzureStorageQueue <T> > CreateAsync(
            IMessageConsumerSettings settings,
            IMessageTimeoutPolicy messageTimeoutPolicy,
            IPoisonMessageBehaviorPolicy poisonMessageBehaviorPolicy,
            IStringMessageSerializer <T> customStringSerializer,
            IBinaryMessageSerializer <T> customBinarySerializer,
            CancellationToken cancellationToken)
        {
            var queue = new AzureStorageQueue <T>(settings,
                                                  messageTimeoutPolicy,
                                                  poisonMessageBehaviorPolicy,
                                                  customStringSerializer,
                                                  customBinarySerializer);

            await queue
            .InstantiateQueues(cancellationToken)
            .ConfigureAwait(false);

            return(queue);
        }
Ejemplo n.º 6
0
 internal MessageConsumerBuilder()
 {
     _settings = new MessageConsumerSettings();
 }