All Products
Search
Document Center

ApsaraMQ for Kafka:Why is the "Cluster authorization failed" error reported during message sending after I enable the idempotence feature?

Last Updated:Sep 06, 2024

Problem description

After I enable the idempotence feature, the Cluster authorization failed error message is returned to the client when I send messages.

Causes

  • You use a topic that uses cloud storage. Such topics do not support the idempotence feature.

  • The IDEMPOTENT_WRITE permission on the cluster is not granted to the message sender. If you use a topic that uses local storage and enable the ACL feature, the ApsaraMQ for Kafka broker automatically determines whether the message sender has the IDEMPOTENT_WRITE permission on the cluster. If the message sender does not have the permission, the message fails to be sent.

Solutions

  1. If you use a topic that uses cloud storage, disable the idempotence feature. To disable the feature, set the enable.idempotence parameter to false on the client.

    Note

    The idempotence feature is automatically enabled for an ApsaraMQ for Kafka client whose version is 3.0 or later. The enable.idempotence parameter is automatically set to true.

  2. Add the IDEMPOTENT_WRITE permission on the cluster to the corresponding user on the Manage SASL User Permissions tab in the ApsaraMQ for Kafka console. For more information, see Use the ACL feature for access control.image