Skip to content

Commit

Permalink
Make topic name accessible in the MessageSplitterImpl (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
Navina Ramesh authored Jan 2, 2019
1 parent 756b70f commit 54c5009
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ public List<ProducerRecord<byte[], byte[]>> split(String topic,
LargeMessageSegment segment = new LargeMessageSegment(segmentMessageId, seq,
numberOfSegments, messageSizeInBytes, payload);

// NOTE: we have to use null topic here to serialize because the segment should be topic independent.
byte[] segmentValue = _segmentSerializer.serialize(null, segment);
// NOTE: Even though we are passing topic here to serialize, the segment itself should be topic independent.
byte[] segmentValue = _segmentSerializer.serialize(topic, segment);
ProducerRecord<byte[], byte[]> segmentProducerRecord =
new ProducerRecord<>(topic, partition, timestamp, segmentKey, segmentValue);
segments.add(segmentProducerRecord);
Expand Down

0 comments on commit 54c5009

Please sign in to comment.