Hi, I have already implemented a draft edition to support filter message.The module of SQL92 grammar is extracted from ActiveMQ with only some grammars, such as
1. numeric comparison, like >, >=, <,<=, BETWEEN 2. character comparison, like =, <>, IN 3. check NULL 4. logical AND, logical OR, logical NOT And optimize some code, e.g. number threshold check, types check, and etc. Others, such as Function, XPath is not integrated. I have also consider about other language may be added later, the module is an independent jar and is nothing to do with RocketMQ. Other language labeled 'some_type' can register to this module and could be used by RocketMQ. To do message filter when pull message from store is the basic implementation.But for high subscription ratio (one topic and N consumers with SQL92 expression), it would increase the gc frequency and occupy more system resources, especially when message body is not small(greater than 1k). The reason is: 1. off-heap to heap, once every consumer subscribed same topic pull message. 2. decode message properties, once every consumer subscribed same topic pull message. So I optimize via calculate the filter results of all consumers subscribed same topic when broker build message queue(maybe slow down this procedure), and save the results to extend file linked to queue. I would describe the details in PR later. Thanks, Eric On Fri, Mar 17, 2017 at 2:52 PM, Von Gosling <[email protected]> wrote: > > Here's any idea -- how about working with the ActiveMQ project to extract > > its SQL92/XPATH implementation of message selectors into some sort of > > modular component that could be used on both projects? I am willing to > > introduce the idea if on the ActiveMQ dev list if you are interested. > > Cool ~ If the filter module can be extracted from ActiveMQ, we are happy > to integrate it naturally. Let ’s listen the filter module contributor > liuxue’s idea. We want to learn more about some keys about his > implementation :-) > > > > > 在 2017年3月17日,13:02,Bruce Snyder <[email protected]> 写道: > > > > Taking code instead of some sort of collaboration is not in the spirit of > > The Apache Way: http://theapacheway.com/ > > > > Here's any idea -- how about working with the ActiveMQ project to extract > > its SQL92/XPATH implementation of message selectors into some sort of > > modular component that could be used on both projects? I am willing to > > introduce the idea if on the ActiveMQ dev list if you are interested. > > > > Bruce > > > > On Thu, Mar 16, 2017 at 8:45 PM, Justin Mclean <[email protected] > > > > wrote: > > > >> Hi, > >> > >>> My question: Is it appropriate that extracting ActiveMQ's JMS selector > >>> implementation into RocketMQ codebase(maybe we will add some extensions > >>> upon it)? > >> > >> It not considered good form to copy other projects code and put into our > >> repo. > >> > >> It would be better to collaborate on the code in their project if that > is > >> possible. > >> > >> Thanks, > >> Justin > >> > >> > > > > > > -- > > perl -e 'print > > unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" );' > > > > ActiveMQ in Action: http://bit.ly/2je6cQ > > Blog: http://bsnyder.org/ <http://bruceblog.org/> > > Twitter: http://twitter.com/brucesnyder > >
