Ejemplo n.º 1
0
 private void DoProcessMessageBatch(List <AirlockEvent <byte[]> > airlockEvents)
 {
     try
     {
         processor.Process(airlockEvents, processorMetrics);
     }
     catch (Exception e)
     {
         log.Error($"Processor failed for routingKey: {routingKey}, processorType: {processor.GetType().Name}, processorId: {processor.ProcessorId}", e);
     }
 }
Ejemplo n.º 2
0
        public void Process(List <AirlockEvent <byte[]> > events, ProcessorMetrics processorMetrics)
        {
            var airlockEvents = events.Select(x => new AirlockEvent <T>
            {
                RoutingKey = x.RoutingKey,
                Timestamp  = x.Timestamp,
                Payload    = airlockDeserializer.Deserialize(new ByteBufferAirlockSource(x.Payload)),
            }).ToList();

            airlockEventProcessor.Process(airlockEvents, processorMetrics);
        }