使用Spring Cloud Stream模拟Azure事件集线器上的生产者错误

发布于 2025-02-11 06:26:12 字数 881 浏览 1 评论 0原文

我正在使用下面的春季云流kafka活页夹的生产者和消费者是我的生产者配置,我想在将消息发送到EventHub并将其引导到错误频道时会收到错误。不确定事件中心如何在哪种情况下在哪种情况下向生产者结束并将其引导到错误频道

server.port: 9876
spring:
  cloud:
    stream:
      bindings:
        output:
          destination: test
      kafka:
        bindings:
          output:
            producer:
         
              retries: 3
              sync: false
        binder:
          configuration:
            request:
              timeout:
                ms: 60000
            security:
              protocol: SASL_SSL
            sasl:
              mechanism: PLAIN
              jaas:
                config: org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="<Pwd>";
          brokers: <Broker URL>
          autoCreateTopics: false
          producer-properties:
            acks: all

I am using a spring cloud stream Kafka binder based producer and consumer Below is my producer configuration , I would like to receive an error upon sending messages to eventhub and channel that to an error channel . Not sure how under what scenario does event hub throw an error on the producer end and channel it to an error channel

server.port: 9876
spring:
  cloud:
    stream:
      bindings:
        output:
          destination: test
      kafka:
        bindings:
          output:
            producer:
         
              retries: 3
              sync: false
        binder:
          configuration:
            request:
              timeout:
                ms: 60000
            security:
              protocol: SASL_SSL
            sasl:
              mechanism: PLAIN
              jaas:
                config: org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="<Pwd>";
          brokers: <Broker URL>
          autoCreateTopics: false
          producer-properties:
            acks: all

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文