Skip to content

Commit

Permalink
feat: support MessageBody on ReceiveContext for Kafka Transport
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusdemboski authored and phatboyg committed May 22, 2023
1 parent a4a7337 commit f9510ec
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public KafkaReceiveContext(ConsumeResult<byte[], byte[]> result, KafkaReceiveEnd
_result = result;
_context = context;

Body = new BytesMessageBody(_result.Message.Value);
InputAddress = context.GetInputAddress(_result.Topic);

_key = new Lazy<TKey>(() => _context.KeyDeserializer.DeserializeKey(result));
Expand All @@ -38,7 +39,7 @@ public KafkaReceiveContext(ConsumeResult<byte[], byte[]> result, KafkaReceiveEnd

protected override IHeaderProvider HeaderProvider => _headerProvider.Value;

public override MessageBody Body => new NotSupportedMessageBody();
public override MessageBody Body { get; }

public string GroupId => _context.GroupId;

Expand Down

0 comments on commit f9510ec

Please sign in to comment.