Jani Yli-Paavola created CAMEL-18596:
----------------------------------------

             Summary: camel-azure-eventhubs consumer is invoking a blocking 
method
                 Key: CAMEL-18596
                 URL: https://issues.apache.org/jira/browse/CAMEL-18596
             Project: Camel
          Issue Type: Bug
          Components: camel-azure-eventhubs
            Reporter: Jani Yli-Paavola


EventHubsConsumer is calling a blocking method from Azure EventContext when 
updating a CheckPoint.


{code:java}
private void processCommit(final Exchange exchange, final EventContext 
eventContext) {
...
   try {
      var completionCondition = processCheckpoint(exchange);
      if (completionCondition.equals(COMPLETED_BY_SIZE)) {
          eventContext.updateCheckpoint();   <-- HERE
          processedEvents.set(0);
        ...
} {code}

And corresponding method in Azure EventContext:
{code:java}
 public void updateCheckpoint() {
        this.updateCheckpointAsync().block();
    }
{code}

I suppose processCommit method should invoke Async method and subscribe to it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to