Getting Operation timed out when trying to send event to Event Hub using Java client 3.0.0 RRS feed

  • Question

  • Hi Team,

    I am trying to send an event to Event Hub using below code link.


    Exception in thread "main" java.util.concurrent.ExecutionException: Operation timed out
    at java.util.concurrent.CompletableFuture.reportGet(
    at java.util.concurrent.CompletableFuture.get(
    at com.newrelic.demo.EventHub.send(
    at com.newrelic.demo.EventHub.main(
    Caused by: Operation timed out
    at org.apache.qpid.proton.engine.BaseHandler.handle(
    at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(
    at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(
    at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(
    at java.util.concurrent.Executors$
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(
    at java.util.concurrent.ScheduledThreadPoolExecutor$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$

    Please do needful.


    Tuesday, September 10, 2019 6:48 AM

All replies

  • Hello,

    TimeoutException indicates that a user-initiated operation is taking longer than the operation timeout.

    For Event Hubs, the timeout is specified either as part of the connection string, or through ServiceBusConnectionStringBuilder. The error message itself might vary, but it always contains the timeout value specified for the current operation.

    Common causes:

    There are two common causes for this error: incorrect configuration, or a transient service error.

    1. Incorrect configuration: The operation timeout might be too small for the operational condition. The default value for the operation timeout in the client SDK is 60 seconds. Check to see if your code has the value set to something too small. Note that the condition of the network and CPU usage can affect the time it takes for a particular operation to complete, so the operation timeout should not be set to a small value.
    2. Transient service error: Sometimes the Event Hubs service can experience delays in processing requests; for example, during periods of high traffic. In such cases, you can retry your operation after a delay, until the operation is successful. If the same operation still fails after multiple attempts, visit the Azure service status site to see if there are any known service outages.

    For more details, refer “Event Hub Timeout Exception”.

    Hope this helps.      


    Do click on "Mark as Answer" and Upvote on the post that helps you, this can be beneficial to other community members.

    Tuesday, September 10, 2019 9:50 AM
  • I don't know what is issue. I also tried Java script SDK which also throws same exception.


    Tuesday, September 10, 2019 1:47 PM
  • Hi Orion,

    In order to understand the issue, I would request you to provide the steps which you are trying to send events from Azure Event Hubs along with the complete Java application code?

    Wednesday, September 11, 2019 9:13 AM
  • Hi Orion,

    Just checking in if you have had a chance to see the previous response. We need the above requested information to understand/investigate this issue further.

    Friday, September 13, 2019 9:49 AM