[ 
https://issues.apache.org/jira/browse/CAMEL-18596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-18596:
--------------------------------
    Fix Version/s: 3.20.0

> 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: Improvement
>          Components: camel-azure-eventhubs
>            Reporter: Jani Yli-Paavola
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.20.0
>
>
> EventHubsConsumer and EventHubsCheckpointUpdaterTimerTask are calling a 
> blocking method from Azure EventContext when updating a CheckPoint.
> In EventHubsConsumer:
> {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}
> In EventHubsCheckpointUpdaterTimerTaks
> {code:java}
> @Override
> public void run() {
>     if (processedEvents.get() > 0) {
>   ...
>         eventContext.updateCheckpoint();   <-- HERE
>         processedEvents.set(0);
>     } 
>   ...
> } {code}
> And corresponding method in Azure EventContext:
> {code:java}
>  public void updateCheckpoint() {
>         this.updateCheckpointAsync().block();
>     }
> {code}
> I suppose EventContext's async update method should be invoked (and 
> subscribed)



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

Reply via email to