com.microsoft.azure.eventhubs.EventHubException:连接中止错误

时间:2019-02-15 17:56:45

标签: scala azure azure-eventhub

我收到错误消息,当调用下面的方法时,它在“ eventHubClient.get().send(messageData)”行失败

def sendEvent(message: String) = {
  val messageData = EventData.create(message.getBytes("UTF-8"))
  println(messageData)
  eventHubClient.get().send(messageData)
  System.out.println("Sent event: " + message + "\n")
}

我遇到错误;

  

com.microsoft.azure.eventhubs.EventHubException:连接异常终止       在com.microsoft.azure.eventhubs.impl.ExceptionUtil.toException(ExceptionUtil.java:58)       在com.microsoft.azure.eventhubs.impl.MessagingFactory.onConnectionError(MessagingFactory.java:257)       在com.microsoft.azure.eventhubs.impl.ConnectionHandler.onTransportError(ConnectionHandler.java:105)       在org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:191)       在org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)       在org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)       在org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:291)       在com.microsoft.azure.eventhubs.impl.MessagingFactory $ RunReactor.run(MessagingFactory.java:483)       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)       在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)       在java.lang.Thread.run(Thread.java:748)

0 个答案:

没有答案