Yes you can certainly handle different incoming event types on a single inbound channel. The channelEventKeyDetection setting specifies how the message is mapped to a event type and the strategy to use will vary depending on the message. For a simple JSON message, the “jsonField” setting will directly map the value of a json field to a event type. For example, the channel definition file would look like:
and the json message
would generate a event of type “failureEvent”. If you need more complex event mapping, you can look at channelEventKeyDetection types of “jsonPointerExpression” (see JsonPointerBasedInboundEventKeyDetector.java for details) or “delegateExpression” to reference a Spring beans that implements the InboundEventKeyDetector class.