Azure eventhub 作为 kafka:主题授权问题

Azure eventhub as kafka : Topic Authorization issue

我创建了一个启用了 kafka 的事件中心命名空间,并创建了一个访问策略为 'Manage, send and listen' 的事件中心。我能够生成此消息,但出现错误 "org.apache.kafka.common.errors.TopicAuthorizationException: Not authorized to access topics: ".

我的 Akka 消费者中的参数是:

akka.kafka.consumer {
  #Akka Kafka consumer properties defined here
  wakeup-timeout=60s

  # Properties defined by org.apache.kafka.clients.consumer.ConsumerConfig
  # defined in this configuration section.
  kafka-clients {
    request.timeout.ms=60000
    group.id=$Default

    bootstrap.servers=“<EventbusDomain>:9093"
    sasl.mechanism=PLAIN
    security.protocol=SASL_SSL
    sasl.jaas.config="org.apache.kafka.common.security.plain.PlainLoginModule required username=\"$ConnectionString\" password=\”<Connection String\”;”
  }
}

你能帮忙吗?

谢谢

我从昨天开始就遇到了这个问题,并在下面添加 属性 来解决这个问题。

spring.cloud.stream.kafka.binder.autoCreateTopics=false

请注意,我们正在使用 spring 云 + azure 事件中心

但是,我无法从事件中心接收消息。

我能够通过修复 pom.xml 中的 kafka 版本来解决问题。显然,Azure 仅支持 kafka 0.10 以上的版本。一旦我更改了依赖项,它就可以正常工作了。