Skip to content

Migration Guide 2.16

Yoann Rodière edited this page Dec 22, 2022 · 14 revisions

Kafka Client Dev services

Kafka Client extension introduces quarkus.kafka.devservices.provider build time property for configuring the dev service image provider. Before 2.16 strimzi images could be used by configuring the quarkus.kafka.devservices.image-name property to a value containing strimzi text. After 2.16 developers have the option to configure quarkus.kafka.devservices.provider to values redpanda (default), strimzi and kafka-native with each option having a default container image. quarkus.kafka.devservices.image-name can still be used to change the default image name.

No wildcard Origin support by default for CORS Filter

CORS filter no longer supports all Origins by default when it is enabled and it has to be configured to allow all Origins. For example, if, after a careful consideration, you decide that all Origins must be supported, then you can do it like this:

quarkus.http.cors=true
quarkus.http.cors.origins=*

QuarkusTransaction.run/QuarkusTransaction.call are deprecated in favor of newly introduced, more explicit methods. Code relying on these methods should be updated as follows:

// Before
QuarkusTransaction.run(() -> { ... });
QuarkusTransaction.call(() -> { ... });
// After
QuarkusTransaction.requiringNew().run(() -> { ... });
QuarkusTransaction.requiringNew().call(() -> { ... });


// Before
QuarkusTransaction.run(QuarkusTransaction.runOptions()
        .semantic(RunOptions.Semantic.REQUIRED),
        () -> { ... });
QuarkusTransaction.call(QuarkusTransaction.runOptions()
        .semantic(RunOptions.Semantic.REQUIRED),
        () -> { ... });
// After
QuarkusTransaction.joiningExisting().run(() -> { ... });
QuarkusTransaction.joiningExisting().call(() -> { ... });


// Before
QuarkusTransaction.run(QuarkusTransaction.runOptions()
        .timeout(10)
        .exceptionHandler((throwable) -> {
            if (throwable instanceof SomeException) {
               return RunOptions.ExceptionResult.COMMIT;
            }
            return RunOptions.ExceptionResult.ROLLBACK;
        }),
        () -> { ... });
QuarkusTransaction.call(QuarkusTransaction.runOptions()
        .timeout(10)
        .exceptionHandler((throwable) -> {
            if (throwable instanceof SomeException) {
               return RunOptions.ExceptionResult.COMMIT;
            }
            return RunOptions.ExceptionResult.ROLLBACK;
        }),
        () -> { ... });
// After
QuarkusTransaction.requiringNew()
        .timeout(10)
        .exceptionHandler((throwable) -> {
            if (throwable instanceof SomeException) {
               return RunOptions.ExceptionResult.COMMIT;
            }
            return RunOptions.ExceptionResult.ROLLBACK;
        })
        .run(() -> { ... });
QuarkusTransaction.requiringNew()
        .timeout(10)
        .exceptionHandler((throwable) -> {
            if (throwable instanceof SomeException) {
               return RunOptions.ExceptionResult.COMMIT;
            }
            return RunOptions.ExceptionResult.ROLLBACK;
        })
        .call(() -> { ... });

See the javadoc of QuarkusTransaction and the documentation of programmatic transactions for more information.

Current version

Migration Guide 3.18

Next version in main

Migration Guide 3.19

Clone this wiki locally