android 将事件发送到Azure事件中心->不允许操作

vsaztqbk  于 2022-11-27  发布在  Android
关注(0)|答案(1)|浏览(150)

我正在Java上执行this tutorial实现Azure事件中心,但遇到以下异常。

com.azure.core.amqp.exception.AmqpException: Operation not permitted, errorContext[NAMESPACE: testhandheld.servicebus.windows.net. ERROR CONTEXT: N/A]
    at com.azure.core.amqp.implementation.ExceptionUtil.toException(ExceptionUtil.java:85)
    at com.azure.core.amqp.implementation.handler.ConnectionHandler.notifyErrorContext(ConnectionHandler.java:351)
    at com.azure.core.amqp.implementation.handler.ConnectionHandler.onTransportError(ConnectionHandler.java:253)
    at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:191)
    at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
    at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
    at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:291)
    at com.azure.core.amqp.implementation.ReactorExecutor.run(ReactorExecutor.java:91)
    at com.azure.core.amqp.implementation.ReactorExecutor.$r8$lambda$NrD3tar-eanl_T0ijanE5E0zkZY(Unknown Source:0)
    at com.azure.core.amqp.implementation.ReactorExecutor$$ExternalSyntheticLambda0.run(Unknown Source:2)
    at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
    at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:920)
    Suppressed: java.lang.Exception: #block terminated with an error
    at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:139)
    at reactor.core.publisher.Mono.block(Mono.java:1731)
    at com.azure.messaging.eventhubs.EventHubProducerClient.createBatch(EventHubProducerClient.java:199)
    at com.example.myapplication.MainActivity$1.run(MainActivity.java:40)
            ... 1 more

连接字符串具有管理、读取和写入权限,所以我不确定问题出在哪里。

hgc7kmma

hgc7kmma1#

  • 我已经遵循相同的MSDOC使用java将事件发送到事件中心,并且能够实现预期的结果。

com.azure.core.amqp.exception.AmqpException:不允许操作,errorContext

  • 关于上述误差,尝试减少批量。
  • 请参阅MSDOC了解有关Azure Event Hub中AMQP错误故障排除步骤的更多信息。

相关问题