Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix by Marie-Laure Momplot, record contains info and not the context #89

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public DeserializationHandlerResponse handle(ProcessorContext processorContext,
var builder = KafkaError.newBuilder();
enrichWithException(builder, consumptionException, consumerRecord.key(), consumerRecord.value())
.setContextMessage("An exception occurred during the stream internal deserialization")
.setOffset(processorContext.offset())
.setPartition(processorContext.partition())
.setTopic(processorContext.topic());
.setOffset(consumerRecord.offset())
.setPartition(consumerRecord.partition())
.setTopic(consumerRecord.topic());

producer.send(new ProducerRecord<>(KafkaStreamsExecutionContext.getDlqTopicName(), consumerRecord.key(), builder.build())).get();
} catch (InterruptedException ie) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import org.apache.kafka.streams.KafkaStreams;
import org.apache.kafka.streams.StreamsBuilder;

import static org.apache.commons.lang3.StringUtils.EMPTY;

/**
* The Kafka Streams starter interface
*/
Expand Down