コード例 #1
0
 public MessageEndpointContext(
     IEnumerable <DomainMessage> processedSuccessfully,
     IEnumerable <DomainMessage> processedUnsuccessfully,
     IEnumerable <DomainMessage> unprocessed,
     MessageEndpointName sourceQueue)
 {
     Unprocessed             = unprocessed.ToList();
     ProcessedSuccessfully   = processedSuccessfully.ToList();
     ProcessedUnsuccessfully = processedUnsuccessfully.ToList();
     SourceQueue             = sourceQueue;
 }
コード例 #2
0
 public MessageEndpoint(
     MessageEndpointName name,
     HttpChannel channel,
     long lastSuccessfullyProcessedMessage,
     uint defaultPollingDelayMs,
     Dictionary <HttpChannelPoller.PollingError, uint> pollingErrorDelays)
 {
     Channel = channel;
     LastSuccessfullyProcessedMessage = lastSuccessfullyProcessedMessage;
     Name               = name;
     DefaultDelayMs     = defaultPollingDelayMs;
     PollingErrorDelays = pollingErrorDelays;
 }
コード例 #3
0
 public PollState(
     MessageEndpointName messageEndpointName,
     uint defaultDelayMs,
     Dictionary <HttpChannelPoller.PollingError, uint> pollingErrorDelayPolicy,
     long lastMessageSuccessfullyProcessed,
     string nextUrl,
     uint delayMs)
 {
     NextUrl        = nextUrl;
     DelayMs        = delayMs;
     DefaultDelayMs = defaultDelayMs;
     LastMessageSuccessfullyProcessed = lastMessageSuccessfullyProcessed;
     MessageEndpointName     = messageEndpointName;
     PollingErrorDelayPolicy = pollingErrorDelayPolicy;
 }
コード例 #4
0
        public static IProcessMessageResult ProcessMessage(
            DomainMessage message,
            MessageEndpointName queueName,
            Func <Type, Action <DomainMessageProcessingContext, object> > processors)
        {
            Logger.Trace($"ProcessMessage: {message.Header}");

            var context = new DomainMessageProcessingContext(
                new Retries(HandlerRetryCount),
                message.Header,
                queueName
                );

            Either <DeserializeError, object> msg2 =
                new Either <DeserializeError, object>(message.Message);

            return(msg2.Match(
                       e => new DeserializationError(e.Exception),
                       msg3 => ProcessMsg(msg3, context, processors)));
        }
コード例 #5
0
 public static MessageEndpointContext Start(MessageEndpointName sourceQueue)
 {
     return(new MessageEndpointContext(sourceQueue));
 }