You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jani Yli-Paavola (Jira)" <ji...@apache.org> on 2022/10/07 07:05:00 UTC

[jira] [Created] (CAMEL-18596) camel-azure-eventhubs consumer is invoking a blocking method

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)