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

file component: confirm not called on idempotentRepository

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.20.1
    • 4.7.0
    • camel-file
    • None
    • Unknown

    Description

      When we bind an idempotent repository to a file component:

      from(
          file("in")
              .noop(true)
              .idempotent(true)
              .idempotentRepository(idempotentRepository)
              .idempotentKey("${file:name}"))

          .

          .

          .

      then method confirm(...) should be called after the exchange has been processed.

      Expected behaviour: method confirm(...) should be called after the exchange has been processed

      Actual behaviour: method confirm(...) is not called.

      Reproducer:

      • Working scenario: bind the idempotency repository "after" the file producer:
        • checkout this github.com repo
        • start the database: cd local-deployment && docker compose up -d && cd ..
        • start the quarkus application. ./mvnw quarkus:dev
        • in a separate terminal, move some file in folder in
        • go to pgadmin4: http://localhost:8091 (username: pgadmin4@pgadmin.org, password: pgadmin4)
        • on the left side, click on docker, then on postgres. When prompted for a password for databaes postgres, enter postgres
        • click Databases -> camel -> Schemas -> public -> tables, right-click idempotency, select "show data"
        • observe that the entry has the column done set to true
        • stop the quarkus application
        • clear database table idempotency
        • delete folders in and outrm -rf in && rm -rf out
      • Bug scenario:
        • switch to branch repository-on-file-producergit fetch && git switch repository-on-file-producer
        • start quarkus application and repeat the test
        • go to pgadmin4, observe that a row was created, but done is not set to true

      Going further, we can also set a break point in or on method confirm(...), and it will not be triggered.

      Remark: this holds also true when a repository is set as inProgressRepository(...)

      FTR: Relevant zulip chat

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            turing85 Marco Bungart
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: