Server return non retriable error là gì

Apache Kafka applications run in a distributed manner across multiple containers or machines. It is necessary to handle error while producing data in kafka producer.

When the producer sends messages to a broker, the broker can return either a success or an error code. Those error codes belong to two categories.

  • Retriable errors. Errors that can be resolved after retrying. For example, if the broker returns the exception NotEnoughReplicasException, the producer can try sending the message again - maybe replica brokers will come back online and the second attempt will succeed.
  • Nonretriable error. Errors that won’t be resolved. For example, if the broker returns an INVALID_CONFIG exception, trying the same producer request again will not change the outcome of the request.

Producer failure Handling is described below For the above 2 different cases.

  • Retry Policy
  • Callback

Retry Policy

For Retriable errors kafka has inbuilt producer properties to enable retry behavior . With appropriate properties set when sending data to broker failed due to retriable error , kafka client automatically do retry based on our configuration .

retries

The retries setting determines how many times the producer will attempt to send a message before marking it as failed. The default values are:

  • 0 for Kafka <= 2.0
  • MAX_INT, i.e., 2147483647 for Kafka >= 2.1

Users should generally prefer to leave this config unset and instead use delivery.timeout.ms to control retry behavior.

delivery.timeout.ms

If retries > 0, for example, retries = 2147483647, the producer won’t try the request forever, it’s bounded by a timeout. where delivery.timeout.ms = 1200000 ms then timeout for the producer is 2 min .

retry.backoff.ms

By default, the producer will wait 100ms between retries, but you can control this using the retry.backoff.ms parameter.

idempotent

idempotent true make sure exactly only one message written to the Kafka . During retry and delivery timeout window , multiple retry will happen in order to maintain data consistency idempotent value to be set true.

max.in.flight.requests.per.connection

Allowing retries without setting max.in.flight.requests.per.connection to 1 will potentially change the ordering. By limiting the number of in-flight requests to 1 (default being`retries`0, i.e., `retries`1 it guarantee that Kafka will preserve message order in the event.

By default, Exchange Trusted Subsystem is not granted the "modify permissions" permission. This causes the Add-ADPermission cmdlet to fail with an Access Denied error in some circumstances.

Specifically, this error will occur under either of the following circumstances:

  • If the admin user who makes the change has an associated mailbox, this error occurs if the Owner of the Active Directory group object being modified differs from the computer that hosts that mailbox.
  • If the admin user who makes the change does not have an associated mailbox, this error occurs if the Owner of the Active Directory group object being modified differs from the computer that hosts the arbitration mailbox (the arbitration mailbox has a name that resembles SystemMailbox{bb558c35-97f1-4cb9-8ff7-d53741dc928c).

Resolution

To work around this issue, add the "modify permissions" permission for the Exchange Trusted Subsystem to the organizational unit (OU) that contains the Distribution Group. To do this, follow these steps:

  1. Open Active Directory Users and Computers.
  2. Select View > Advanced Features.
  3. Right-click the OU that contains the distribution lists, and then select Properties.
  4. Select Security > Advanced.
  5. Select Permissions > Add.
  6. In the Permissions Entry for <OU NAME> window, select Select a principal.
  7. In the Enter object name to select box, type Exchange Trusted Subsystem, and then select OK. Note: If Exchange Server is installed in a domain other than this Organizational Unit's domain, Exchange Trusted Subsystem may not be found in the current domain. It will be necessary to change the From this location setting to the domain in which Exchange is installed.
  8. In the Permissions Entry for <OU NAME> window, change the Applies to value to Descendant Group objects.
  9. To clear all permission selections that have been added by default, scroll to the bottom of the window and select Clear all.
  10. In the Permissions section of the window, select Modify permissions.
  11. To apply the permission and close all windows, select OK three times.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.