Request Rule Validator

Enforce a consumer group naming conventionv1.3+

This Request Rule Validator policy requires every consumer group ID to start with team-a..

Kafka clients use a group ID in more than one request type, so the policy applies the same rule to all of them:

  • join_group: A consumer joins a group with the classic consumer group protocol.
  • consumer_group_heartbeat: A consumer joins a group and stays in it with the modern consumer group protocol.
  • offset_commit: A client commits offsets for a group. Clients can commit offsets without joining the group first.
  • offset_fetch: A client reads the committed offsets of a group.
  • txn_offset_commit: A transactional producer commits offsets for a group as part of a transaction.

When a group ID doesn’t match the rule, Event Gateway rejects the request with the Kafka POLICY_VIOLATION error code. If a single offset_fetch request carries more than one group, Event Gateway rejects only the groups that don’t match.

Set up the policy

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!