Beispiel #1
0
        public static XXXDeliveryReport XXXDeliveryResult(DeliveryReport <byte[], byte[]> message)
        {
            var headers = new MessageHeaders();

            foreach (var header in message.Message.Headers)
            {
                headers.Add(header.Key, header.GetValueBytes());
            }
            XXXError err = new XXXError();

            err.IsError = message.Error.IsError;

            var intermediateMessage = new XXXDeliveryReport(headers, message.Message.Value);

            intermediateMessage.Topic     = message.Topic;
            intermediateMessage.Partition = message.Partition;
            intermediateMessage.Offset    = message.Offset;
            intermediateMessage.Error     = err;

            return(intermediateMessage);
        }
Beispiel #2
0
 public XXXProduceException(XXXError error)
 {
     this.Error = error;
 }
Beispiel #3
0
 public XXXProduceException(XXXError error, XXXDeliveryResult deliveryResult, Exception innerException)
 {
     this.DeliveryResult = deliveryResult;
     this.Error          = error;
 }