It's hard to say whether it's a "good idea," per se. However, if you can extend the broker to fit your use-case that's really what open-source is all about. Typically the concern with filtering is performance since the filter needs to be evaluated for every single message sent to the queue. For example, by default filters work on message headers and properties, but there's an XPATH feature [1] that can filter on the _body_ of a message which could potentially execute much more slowly causing latency increases for all producers and increased CPU utilization on the broker. If your filter implementation is doing something relatively slow then it may have a sizable impact on performance.
It's possible this is a bit of functionality that we could incorporate into the code-base to benefit all users. Would you be willing to put together a pull-request? Also, could you elaborate on your use-case? What exactly are you implementing with the new filter? Justin [1] https://activemq.apache.org/components/artemis/documentation/latest/filter-expressions.html#xpath On Wed, Jun 5, 2024 at 11:05 AM Hamza HATHOUTE <hamza.hathout...@thalesdigital.io.invalid> wrote: > Hello, > > I would like to ask whether it is a good idea to have custom filtering for > queues. > > I’m thinking about having a jar with a static method that creates an > instance of BooleanExpression. The filter would be something like “CALL > ‘com__external__pkg__Class__functionName’(param1, …)”. > > I’ve made some changes to the ‘artemis-selector’ project to implement > this, looks like it is feasible, therefore my question. > > Of course, I understand that this filter will only be used for server-side > filtering. > > Thanks, > > Hamza > > > This message contains confidential information and is intended only for > the individual(s) addressed in the message. If you are not the named > addressee, you should not disseminate, distribute, or copy this e-mail. If > you are not the intended recipient, you are notified that disclosing, > distributing, or copying this e-mail is strictly prohibited. >