summaryrefslogtreecommitdiff
path: root/src/prefix_filter.cpp
AgeCommit message (Collapse)Author
2012-06-01Assertions improvedMartin Sustrik
This patch is replaces generic xs_asserts by errno_assers and alloc_asserts as appropriate. It is based on 0MQ patch by Martin Hurton. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
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>
2012-05-21Fixes a conflict with XenStore (seeMartin Lucina
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668550) Signed-off-by: Martin Lucina <martin@lucina.net>
2012-04-29Fix a bug in prefix filter compaction logicAdam Guthrie
2012-04-15Filters can transform user subscriptions to wire subscriptionMartin Sustrik
Till now the subscription, as specified by the user, was send upstream. This patch allows SUB-side filter to transform the user subscription into wire subscription. For example, only a has can be sent upstream instead of a perfect subscription. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-14Separate subscription forwarding from SUB-side filteringMartin Sustrik
- subscription forwarding is handled by XSUB socket - filtering is handled by SUB sockets - subscriptions are decoupled from filter engines - filter doesn't have to be able to enumarate the subscriptions (no sf_enumerate function) Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-12Memory allocation bug fixed in prefix filterMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-12Accumulated cruft removed from prefix_filter_tMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-05XS_PLUGIN and XS_FILTER implementationMartin Sustrik
This patch introduces following features: - XS_PLUGIN context option to add plugins to libxs - XS_FILTER option to switch between different filter types - Automatic loading of plug-ins is *not* implemented. From the implementation point of view: - standard prefix filter is implemented as a pluggable filter - trie_t and mtrie_t are joined into a single class - the code for 0MQ/3.1 compatibility is left in in the form of comments - new test for testing re-subscriptions is added Signed-off-by: Martin Sustrik <sustrik@250bpm.com>