Package com.onec.kafka
Interface EventHandler
public interface EventHandler
Application-defined handler for inbound CloudEvents. Register one or more as Spring beans;
every handler whose
supports(String) matches an event's type is invoked.
Handlers should be idempotent. The framework de-duplicates by CloudEvent id via the inbox, but a handler may still be retried if it throws after partial work.
-
Method Summary
-
Method Details
-
supports
- Returns:
trueif this handler should process the given CloudEventtype.
-
handle
Process the event. Throwing signals failure: the inbox row is marked FAILED and the message is dead-lettered (if configured) or redelivered.
-