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

    Modifier and Type
    Method
    Description
    void
    Process the event.
    boolean
    supports(String eventType)
     
  • Method Details

    • supports

      boolean supports(String eventType)
      Returns:
      true if this handler should process the given CloudEvent type.
    • handle

      void handle(InboundEvent event)
      Process the event. Throwing signals failure: the inbox row is marked FAILED and the message is dead-lettered (if configured) or redelivered.