Go to file
David Ansari be5fefd35d end-to-end spike
Add lexer, parser, and evaluator

> A message selector is a String whose syntax is based on a subset of the SQL92[2] conditional expression syntax.

* `leex` is used to scan this string into a flat structure of tokens.
* `yecc` is used to parse these tokens into a tree (conforming with the grammar rules).

Example:

```erl
1> String = "JMSType = 'car' AND color = 'blue' AND weight > 2500".
"JMSType = 'car' AND color = 'blue' AND weight > 2500"

2> {ok, Tokens, _} = rabbit_jms_selector_lexer:string(String).
{ok,[{identifier,1,<<"JMSType">>},
     {'=',1},
     {string,1,<<"car">>},
     {'AND',1},
     {identifier,1,<<"color">>},
     {'=',1},
     {string,1,<<"blue">>},
     {'AND',1},
     {identifier,1,<<"weight">>},
     {'>',1},
     {integer,1,2500}],
    1}

3> {ok, Expr} = rabbit_jms_selector_parser:parse(Tokens).
{ok,{'and',{'and',{'=',{identifier,<<"JMSType">>},
                       {string,<<"car">>}},
                  {'=',{identifier,<<"color">>},{string,<<"blue">>}}},
           {'>',{identifier,<<"weight">>},{integer,2500}}}}

4> Headers = [{<<"JMSType">>, <<"car">>}, {<<"color">>, <<"blue">>}, {<<"weight">>, 3000}].
[{<<"JMSType">>,<<"car">>},
 {<<"color">>,<<"blue">>},
 {<<"weight">>,3000}]

5> rabbit_fifo_filter:evaluate(Expr, Headers).
true
```
2025-05-08 12:03:23 +02:00
.github Bump google-github-actions/auth from 2.1.9 to 2.1.10 2025-04-25 18:39:38 +00:00
deps end-to-end spike 2025-05-08 12:03:23 +02:00
doc Add files to specify license info 2020-08-18 12:42:43 -07:00
mk Use Erlang.mk's native Elixir support for CLI 2025-03-18 10:02:49 +01:00
packaging Use Erlang.mk's native Elixir support for CLI 2025-03-18 10:02:49 +01:00
release-notes 4.1.0 release notes edits 2025-05-03 11:41:49 -04:00
scripts Remove Bazel files 2025-03-13 13:42:34 +00:00
selenium Add functions to mgt-api for selenium 2025-05-07 17:38:31 +02:00
.dockerignore dockerignore deps 2021-03-18 15:04:39 +00:00
.elp.toml Add configuration for ELP language server 2024-05-16 11:10:40 +02:00
.git-blame-ignore-revs Add #13008 to .git-blame-ignore-revs 2025-01-02 12:08:04 -05:00
.gitignore Adds rabbit_auth_backend_internal_loopback 2025-04-09 12:53:29 -07:00
.mailmap Add .mailmap file 2023-11-03 13:17:30 +01:00
CODE_OF_CONDUCT.md Replace @rabbitmq.com addresses with rabbitmq-core@groups.vmware.com 2023-06-20 15:40:13 +04:00
COMMUNITY_SUPPORT.md Update COMMUNITY_SUPPORT.md 2024-12-03 11:03:34 -05:00
CONTRIBUTING.md Document RABBITMQ_METADATA_STORE in CONTRIBUTING.md 2024-12-19 17:40:34 -05:00
LICENSE Replace @rabbitmq.com addresses with rabbitmq-core@groups.vmware.com 2023-06-20 15:40:13 +04:00
LICENSE-APACHE2 (c) year bumps 2024-01-01 22:02:20 -05:00
LICENSE-MPL-RabbitMQ Revert drop of Exhibit B on MPL 2.0 2020-07-20 17:03:37 +01:00
Makefile Adds rabbit_auth_backend_internal_loopback 2025-04-09 12:53:29 -07:00
PKG_LINUX.md URL Cleanup 2019-03-20 03:22:38 -05:00
PKG_WINDOWS.md Windows doc tweaks 2018-11-08 13:48:46 -08:00
README.md Support AMQP over WebSocket (OSS part) 2025-01-27 17:50:47 +01:00
SERVER_RELEASES.md Update SERVER_RELEASES.md 2025-02-10 14:16:51 -05:00
erlang.mk Update Erlang.mk 2025-03-20 15:24:05 +01:00
erlang_ls.config erlang_ls: Add 'deps/*/' to include dirs 2024-04-12 09:49:34 -04:00
plugins.mk Adds rabbit_auth_backend_internal_loopback 2025-04-09 12:53:29 -07:00
rabbitmq-components.mk Merge pull request #13818 from rabbitmq/rabbitmq-server-13767 2025-04-27 12:58:02 +04:00
rebar.config Revert "Format MQTT code with `erlfmt`" 2023-01-27 18:25:57 +00:00

README.md

Test

RabbitMQ Server

RabbitMQ is a feature rich, multi-protocol messaging and streaming broker. It supports:

Installation

Tutorials and Documentation

Some key doc guides include

RabbitMQ documentation is also developed on GitHub.

Commercial Features and Support

Getting Help from the Community

Please read the Community Support Eligibility Policy document first.

The recommended community forums are

Contributing

See CONTRIBUTING.md and our development process overview.

Questions about contributing, internals and so on are very welcome in GitHub Discussions or community Discord server in the core-and-plugin-dev channel.

Licensing

RabbitMQ server is licensed under the MPL 2.0.

Community Support Eligibility Policy document explains the open source RabbitMQ support policy adopted by the RabbitMQ Core Team.

Building From Source and Packaging

(c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.