简体   繁体   English

使用Kafka活页夹在Spring Cloud Stream中重播死信队列中的消息

[英]Replay messages from dead letter queue in Spring Cloud Stream with Kafka binder

We are using Spring Cloud Stream with Confluent Schema Registry , Avro and Kafka binder. 我们正在将Spring Cloud StreamConfluent Schema RegistryAvroKafka活页夹结合使用。 We have configured all our services in the data processing pipeline to use a shared DLQ Kafka topic to simplify the process of exception handling and be able to replay failed messages. 我们已将数据处理管道中的所有服务配置为使用共享的DLQ Kafka主题,以简化异常处理过程并能够重播失败的消息。 However, it looks like that for some reason we are not able to properly extract payload messages as messages with different schemas are published to a single dlq. 但是,由于某些原因,由于具有不同架构的消息被发布到单个dlq,因此我们似乎无法正确提取有效负载消息。 Hence, we are losing the track of schema of the original message. 因此,我们失去了原始消息的架构跟踪。

I was wondering if there is any way we could maintain the original schema_id of the failed messages in dlq so that it can be used for the purpose of seamless replay. 我想知道是否有什么方法可以在schema_id中维护失败消息的原始schema_id ,以便可以将其用于无缝重播。

It turns out by changing the Subject Naming Strategy to be RecordNameStrategy this can be achieved and regardless of the topic name, a record maintains the original schema across all the topics. 事实证明,通过将主题命名策略更改为RecordNameStrategy可以实现,并且无论主题名称如何,记录都将保留所有主题的原始架构。 More details can be found here . 可以在此处找到更多详细信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 带有 Avro 消息的 Spring Cloud Stream JSON 死信队列 - Spring Cloud Stream JSON Dead Letter Queue with Avro messages 使用 spring-cloud-stream-kafka-binder 生成的 spring-kafka 消费一条 avro 消息 - Consumer a avro message using spring-kafka produced by spring-cloud-stream-kafka-binder Spring Cloud Stream Kafka Stream与本机Kafka Stream应用程序和生产者之间不兼容的Avro消息 - Incompatible Avro messages between Spring Cloud Stream Kafka Stream and native Kafka Stream applications and producers Spring Cloud Stream kafka avro 反序列化 - Spring cloud stream kafka avro deserialization Spring Kafka、Spring Cloud Stream 和 Avro 兼容性未知魔术字节 - Spring Kafka, Spring Cloud Stream, and Avro compatibility Unknown magic byte 使用Kafka-Avro-Console-Consumer消耗Spring Cloud Stream Kafka发送的Avro消息时出错 - Error when use kafka-avro-console-consumer consume avro message sent by spring cloud stream kafka 如何使用 Spring Boot 和 Spring Cloud 流在 kafka 生产者上设置 avro 内容类型 - How to set avro content type on kafka producer with spring boot and spring cloud stream java.lang.NullPointerException:使用 Avro 格式的 Spring Cloud Stream 3 Kafka Function Producer 中的 null - java.lang.NullPointerException: null in Spring Cloud Stream 3 Kafka Function Producer that uses Avro format Spring Cloud Stream + Avro - Spring Cloud Stream + Avro 带有融合架构注册表的Spring Cloud Stream Kafka无法将消息发送到通道输出 - Spring Cloud Stream Kafka with confluent schema registry failed to send Message to channel output
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM