Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-18596

camel-azure-eventhubs consumer is invoking a blocking method

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      EventHubsConsumer and EventHubsCheckpointUpdaterTimerTask are calling a blocking method from Azure EventContext when updating a CheckPoint.

      In EventHubsConsumer:

      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);
              ...
      } 

      In EventHubsCheckpointUpdaterTimerTaks

      @Override
      public void run() {
          if (processedEvents.get() > 0) {
        ...
              eventContext.updateCheckpoint();   <-- HERE
              processedEvents.set(0);
          } 
        ...
      } 

      And corresponding method in Azure EventContext:

       public void updateCheckpoint() {
              this.updateCheckpointAsync().block();
          }
      

      I suppose EventContext's async update method should be invoked (and subscribed)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jylipaa Jani Yli-Paavola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: