Created
April 4, 2022 20:41
-
-
Save schroedermatt/f159cc3744743516a8af543a4a45884c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** | |
* Custom subscriber that will be notified on all UnleashEvents. | |
* The extended Log4JSubscriber will log out the events that are not | |
* handled in this extension. | |
**/ | |
public class KafkaUnleashSubscriber extends Log4JSubscriber { | |
@Override | |
public void on(@NotNull UnleashEvent event) { | |
// many events come through here, we only care about responses | |
if (event instance of FeatureToggleResponse) { | |
// event has ALL toggles, filter out those you care about | |
// apply toggles to consumer | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment