summaryrefslogtreecommitdiff
path: root/src/topic_filter.hpp
AgeCommit message (Collapse)Author
2012-05-26Topic filter implementedMartin Sustrik
The filter is build into libxs rather than being a plug-in. It's ID is XS_FILTER_TOPIC. The filter assumed that the messages are text-based and consider binary 0 to be a delimiter separating message topic from the message body. Use of the delimiter is not mandatory though. If binary zero is not present, whole message is used for matching. The topic is separated into elements using dots, e.g. "animals.dogs.fluffy". Subscriptions match individual elements. Each element can be matched by either literal string or a wildcard (*), for example: "animals.*.fluffy" matches all animals called Fluffy irrsepctive of whether they are dogs, cats or whatever. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>