com.microsoft.azure.eventhubs.EventHubException: connection aborted error

回眸只為那壹抹淺笑 提交于 2019-12-12 01:12:09

问题


I am getting error, when calling below method, it's failing at line "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")
}

Error I am getting;

com.microsoft.azure.eventhubs.EventHubException: connection aborted at com.microsoft.azure.eventhubs.impl.ExceptionUtil.toException(ExceptionUtil.java:58) at com.microsoft.azure.eventhubs.impl.MessagingFactory.onConnectionError(MessagingFactory.java:257) at com.microsoft.azure.eventhubs.impl.ConnectionHandler.onTransportError(ConnectionHandler.java:105) 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.microsoft.azure.eventhubs.impl.MessagingFactory$RunReactor.run(MessagingFactory.java:483) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

来源:https://stackoverflow.com/questions/54714707/com-microsoft-azure-eventhubs-eventhubexception-connection-aborted-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!