I agree with Robbie. This is the expected behavior.
Justin On Tue, Jan 16, 2024 at 4:41 AM Calle Andersson <calleanders...@hotmail.com> wrote: > Hi, > > I’m not sure if I have discovered a bug in Artemis (2.31.2) or if I have > misunderstood something. > > I used the following command to create a new instance: > apache-artemis-2.31.2/bin/artemis create --user admin --password admin > --no-autocreate --require-login myBroker > > I have added the following address: > <address name="TEST.QUEUE.A"> > <anycast> > <queue > name="TEST.QUEUE.A"> > > <filter string="NOT(MyHeader='lorem')" /> > </queue> > </anycast> > </address> > > When sending a message with the “MyHeader” header set to “ipsum”, the > message ends up on the queue (as expected). > > However, if the “MyHeader” header is missing, the message simply > disappears. E.g. when using the following command: > ./artemis producer --url tcp://localhost:61616 --user admin --password > admin --message-count 1 --destination TEST.QUEUE.A --message "no header" > (BTW, is it somehow possible to specify custom headers when using the > producer command? I’ve not seen any information about support for that but > it could be handy in some cases.) > > I expected messages without “MyHeader” header to end up on the queue > (given the filter above). Instead, I have to use the following filter to > make messages without the header to end up on the queue: > <filter string="(MyHeader IS NULL) OR (NOT(MyHeader='lorem'))" /> > > Is this a bug or a feature? > > Regards, > Calle > >