As shown in the preceding figure, channel selector helps in selecting the right channel based on set criteria. Very much similar to interceptors, channel selector is classified into two main categories:
- Built-in channel selector:
- Replicating channel selector
- Default channel selector if explicitly not specified
- If more than one channel is specified for a source, each channel gets a copy of the event.
- Multiplexing Channel Selector
- According to header value a channel is selected.
- Can say that this provides dynamic routing based on the specified header values.
- Context Routing
- Custom Channel Selector: For handling dynamic criteria you can write your own custom implementation for ChannelSelector class.