Skip to content

Commit

Permalink
[apache#3903] Add topic validation, forbid sending message to system …
Browse files Browse the repository at this point in the history
…topic (apache#3904)

* Forbid sending message to system topic.

* Forbid sending message to system topic.The topic RMQ_SYS_TRACE_TOPIC should be excluded.
  • Loading branch information
sunxi92 authored and 上河 committed Mar 3, 2022
1 parent 8c2676f commit cb5bed2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ public class TopicValidator {
SYSTEM_TOPIC_SET.add(RMQ_SYS_OFFSET_MOVED_EVENT);

NOT_ALLOWED_SEND_TOPIC_SET.add(RMQ_SYS_SCHEDULE_TOPIC);
NOT_ALLOWED_SEND_TOPIC_SET.add(RMQ_SYS_TRANS_HALF_TOPIC);
NOT_ALLOWED_SEND_TOPIC_SET.add(RMQ_SYS_TRANS_OP_HALF_TOPIC);
NOT_ALLOWED_SEND_TOPIC_SET.add(RMQ_SYS_TRANS_CHECK_MAX_TIME_TOPIC);
NOT_ALLOWED_SEND_TOPIC_SET.add(RMQ_SYS_SELF_TEST_TOPIC);
NOT_ALLOWED_SEND_TOPIC_SET.add(RMQ_SYS_OFFSET_MOVED_EVENT);

// regex: ^[%|a-zA-Z0-9_-]+$
// %
Expand Down

0 comments on commit cb5bed2

Please sign in to comment.