Name | |
---|---|
MamaRegexChannelFilter() | |
void | setDefaultChannel(int channelId) |
void | addRegex(final String regexStr, final int channelId) |
int | getChannel(final String target) |
inline MamaRegexChannelFilter()
Creates a MAMA regex filter to help filter strings into channels (ints). The channel itself has no special meaning - it’s simply a number to produce when each regular expression is matched.
The main use case is for load balancing dispatcher queues according to topic names.
inline void setDefaultChannel(
int channelId
)
Parameters:
Sets a default channel to use if no filters produce hits during matching.
inline void addRegex(
final String regexStr,
final int channelId
)
Parameters:
Adds a regex string and associated integer. During calls to getChannel, the target string will be matched against this regular expression to see which channel matches it.
inline int getChannel(
final String target
)
Parameters:
Looks up all channel filters to see which channel this target should be routed to.
Updated on 2023-03-31 at 15:29:43 +0100