Browse Source

Tweak kafka read header by index when the Key already exists.

master
Savorboard 3 years ago
parent
commit
f9e46337e7
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs

+ 2
- 2
src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs View File

@@ -106,7 +106,7 @@ namespace DotNetCore.CAP.Kafka
var customHeaders = _kafkaOptions.CustomHeaders(consumerResult); var customHeaders = _kafkaOptions.CustomHeaders(consumerResult);
foreach (var customHeader in customHeaders) foreach (var customHeader in customHeaders)
{ {
headers.Add(customHeader.Key, customHeader.Value);
headers[customHeader.Key] = customHeader.Value;
} }
} }


@@ -177,6 +177,6 @@ namespace DotNetCore.CAP.Kafka
Reason = $"An error occurred during connect kafka --> {e.Reason}" Reason = $"An error occurred during connect kafka --> {e.Reason}"
}; };
OnLog?.Invoke(null, logArgs); OnLog?.Invoke(null, logArgs);
}
}
} }
} }

Loading…
Cancel
Save