com.microsoft.azure.eventhubs.EventHubException: c

2019-08-29 08:19发布

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)

0条回答
登录 后发表回答