-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The 'throttled' commit strategy requires substituting the built-in re…
…balance listener.
- Loading branch information
1 parent
2dde78f
commit d6fc10c
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
.../smallrye/reactivemessaging/kafka/deployment/SmallRyeReactiveMessagingKafkaProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
package io.quarkus.smallrye.reactivemessaging.kafka.deployment; | ||
|
||
import io.quarkus.deployment.Feature; | ||
import io.quarkus.deployment.annotations.BuildProducer; | ||
import io.quarkus.deployment.annotations.BuildStep; | ||
import io.quarkus.deployment.builditem.FeatureBuildItem; | ||
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; | ||
import io.vertx.kafka.client.consumer.impl.KafkaReadStreamImpl; | ||
|
||
public class SmallRyeReactiveMessagingKafkaProcessor { | ||
|
||
@BuildStep | ||
FeatureBuildItem feature() { | ||
return new FeatureBuildItem(Feature.SMALLRYE_REACTIVE_MESSAGING_KAFKA); | ||
} | ||
|
||
@BuildStep | ||
public void build(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) { | ||
// Required for the throttled commit strategy | ||
reflectiveClass.produce( | ||
ReflectiveClassBuildItem.builder(KafkaReadStreamImpl.class) | ||
.fields(true) | ||
.methods(true) | ||
.constructors(true) | ||
.finalFieldsWritable(true) | ||
.build()); | ||
} | ||
|
||
} |