public void configure()

in jpa-idempotent-repository/src/main/java/org/acme/jpa/idempotent/repository/JpaIdempotentRoute.java [53:74]


    public void configure() {
        /**
         * Read the files generated by the example harness in the target/input-files folder
         */
        from("file:target/input-files")
                .log("Received an example input file having the content ${body}")
                /**
                 * The idempotent consumer pattern could be used as below. All messages presented with the same body more
                 * than once will be filtered out.
                 */
                .idempotentConsumer(simple("${body}"))
                /**
                 * A place is needed in order to keep track of duplicate message bodies, it's called an idempotent
                 * repository The idempotent repository could be provided as a bean from the registry like below.
                 */
                .idempotentRepository("jpaIdempotentRepository")
                .log("The file was not a duplicate, invoke the costly API")
                /**
                 * Sends the content of the file to the costly API simulated by the example harness.
                 */
                .toF("http://localhost:%s/costly-api-call", quarkusPlatformHttpPort);
    }