You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Marco Bungart (Jira)" <ji...@apache.org> on 2023/02/03 23:00:00 UTC

[jira] [Created] (CAMEL-19010) file component: confirm not called on idempotentRepository

Marco Bungart created CAMEL-19010:
-------------------------------------

             Summary: file component: confirm not called on idempotentRepository
                 Key: CAMEL-19010
                 URL: https://issues.apache.org/jira/browse/CAMEL-19010
             Project: Camel
          Issue Type: New Feature
          Components: camel-file
    Affects Versions: 3.20.1
            Reporter: Marco Bungart


When we beind 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:
 * checkout [this {{github.com}} repo|https://github.com/turing85/camel-quarkus-idempotent-consumer]
 * 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|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 {{{}out{}}}: {{rm -rf in && rm -rf out}}
 * switch to branch {{{}repository-on-file-producer{}}}: {{git 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}}
 * {{{}{}}}{{{}{}}}



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