Incompatible Changes in EMQX 6.0
6.1.0
#16368 The internal regular expression engine has been upgraded to PCRE2, providing improved matching performance and stricter syntax enforcement.
If you use the
regex_match,regex_replace, orregex_extractfunctions in Rule Engine SQL, some existing regular expressions that relied on lenient or undefined behavior may no longer compile or match as expected.Key changes to be aware of include:
- Stricter escaping rules: Invalid or unnecessary escape sequences that were previously ignored are now treated as errors.
- Broken:
[\w-\.], escaping.inside a character class is unnecessary and no longer accepted; only metacharacters require escaping. - Broken:
\xwithout valid hexadecimal digits (for example,\xGG) now causes a compilation error instead of being interpreted as a literalx.
- Broken:
- Stricter group name validation: Regular expressions with duplicate or empty named capture groups are no longer permitted.
Action required: Review and validate all Rule Engine SQL definitions that use regular expressions. For complex patterns, verify compatibility with a PCRE2-compliant tester (most online regex tools support PCRE2) or test thoroughly in a staging environment before upgrading.
- Stricter escaping rules: Invalid or unnecessary escape sequences that were previously ignored are now treated as errors.
6.0.1
#16061 Fixed an issue where RocketMQ actions ignored the configured payload template and sent the entire rule output instead.
If you relied on the previous (incorrect) behavior, you may need to update your payload templates to ensure messages are formatted as expected.