You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by di...@apache.org on 2019/02/25 07:22:07 UTC

[rocketmq] branch develop updated: [RIP-9] Commit docs Design_Filter.md (#840)

This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 3041c82  [RIP-9] Commit docs Design_Filter.md (#840)
3041c82 is described below

commit 3041c82341cd5436ac6ea0925b8efee5279a6251
Author: xiaoyaofawai <wa...@126.com>
AuthorDate: Mon Feb 25 15:22:02 2019 +0800

    [RIP-9] Commit docs Design_Filter.md (#840)
    
    [RIP-9] Commit docs Design_Filter.md
---
 docs/en/Design_Filter.md             |  10 ++++++++++
 docs/en/images/rocketmq_design_7.png | Bin 0 -> 6780 bytes
 2 files changed, 10 insertions(+)

diff --git a/docs/en/Design_Filter.md b/docs/en/Design_Filter.md
new file mode 100644
index 0000000..246e162
--- /dev/null
+++ b/docs/en/Design_Filter.md
@@ -0,0 +1,10 @@
+# Message Filter
+RocketMQ - a distributed message queue, is different with all other MQ middleware, on the way of filtering messages. It's do the filter when the messages are subscribed via consumer side.RocketMQ do it lies in the separate storage mechanism that Producer side writing messages and Consomer subscribe messages, Consumer side will get an index from a logical message queue ConsumeQueue when subscribing, then read message entity from CommitLog using the index. So in the end, it is still imposs [...]
+
+![](images/rocketmq_design_7.png)
+
+The RocketMQ has two mainly filter types:
+
+* Tag filtering: Consumer can specify not only the message topic but also the message tag values, when subscribing. Multiple tag values need to be separated by '||'. When consumer subscribing a message, it builds the subscription request into a `SubscriptionData` object and sends a Pull message request to the Broker side. Before the Broker side reads data from the RocketMQ file storage layer - Store, it will construct a `MessageFilter` using the `SubscriptionData` object and then pass it [...]
+
+* SQL92 filtering: This filter behavior is almost same with the above Tag filtering method. The only difference is on the way how Store works. The rocketmq-filter module is responsible for the construction and execution of the real SQL expression. Executing an SQL expression every time a filter is executed affects efficiency, so RocketMQ uses BloomFilter to avoid doing it every time. The expression context of SQL92 is a property of the message.
diff --git a/docs/en/images/rocketmq_design_7.png b/docs/en/images/rocketmq_design_7.png
new file mode 100644
index 0000000..b0faa86
Binary files /dev/null and b/docs/en/images/rocketmq_design_7.png differ