summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-05-26 09:17:47 +0200
committerMartin Sustrik <sustrik@250bpm.com>2012-05-26 09:17:47 +0200
commita696112a5c1a493e24ec4f72d1c4df95e5d390dc (patch)
treebb2582c974b56288ab8b6f46b0231d044cddb3cf /include
parentd7ccc9523881afa0453784b28c20ec66365432f6 (diff)
Topic filter implemented
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>
Diffstat (limited to 'include')
-rw-r--r--include/xs/xs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/xs/xs.h b/include/xs/xs.h
index 9b09812..120bd1f 100644
--- a/include/xs/xs.h
+++ b/include/xs/xs.h
@@ -278,6 +278,7 @@ XS_EXPORT unsigned long xs_stopwatch_stop (void *watch);
#define XS_FILTER_ALL 0
#define XS_FILTER_PREFIX 1
+#define XS_FILTER_TOPIC 2
typedef struct
{