
    Ii
                        S SK Jr  S SKrS SKr " S S\5      r " S S\5      r " S S\5      r " S	 S
\5      r " S S\5      r	 " S S\5      r
 " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      r " S' S(\5      r " S) S*\5      r " S+ S,\5      r " S- S.\5      r " S/ S0\5      r " S1 S2\5      r " S3 S4\5      r " S5 S6\5      r\r " S7 S8\5      r  " S9 S:\5      r! " S; S<\5      r" " S= S>\5      r# " S? S@\5      r$ " SA SB\5      r% " SC SD\5      r& " SE SF\5      r' " SG SH\5      r( " SI SJ\5      r) " SK SL\5      r* " SM SN\5      r+ " SO SP\5      r, " SQ SR\5      r- " SS ST\5      r. " SU SV\5      r/ " SW SX\5      r0 " SY SZ\5      r1 " S[ S\\5      r2 " S] S^\5      r3 " S_ S`\5      r4 " Sa Sb\5      r5 " Sc Sd\5      r6 " Se Sf\5      r7 " Sg Sh\5      r8 " Si Sj\5      r9 " Sk Sl\5      r: " Sm Sn\5      r; " So Sp\5      r< " Sq Sr\5      r= " Ss St\5      r> " Su Sv\5      r? " Sw Sx\5      r@ " Sy Sz\5      rA " S{ S|\5      rB " S} S~\5      rC " S S\5      rD " S S\5      rE " S S\5      rF " S S\5      rG " S S\5      rH " S S\5      rI " S S\5      rJ " S S\5      rK " S S\5      rL " S S\5      rM " S S\5      rN " S S\5      rO " S S\5      rP " S S\5      rQ " S S\5      rR " S S\5      rS " S S\5      rT " S S\5      rU " S S\5      rV " S S\5      rW " S S\5      rX " S S\5      rY " S S\5      rZ " S S\5      r[ " S S\5      r\ " S S\5      r] " S S\5      r^ " S S\5      r_ " S S\5      r` " S S\5      ra " S S\5      rb " S S\5      rc " S S\5      rd " S S\5      re " S S\5      rf " S S\5      rg " S S\5      rh " S S\5      ri " S S\5      rj " S S\5      rk " S S\5      rl " S S\5      rm " S S\5      rn " S S\5      ro " S S\5      rp " S S\5      rq " S S\5      rr " S S\5      rs " S S\5      rt " S S\5      ru " S S\5      rv " S S\5      rw " S S\5      rx " S S\5      ry " S S\5      rz " S S\5      r{ " S S\5      r| " S S\5      r} " S S\5      r~ " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S GS \5      r " GS GS\5      r " GS GS\5      r " GS GS\5      r " GS GS\5      r " GS	 GS
\5      r " GS GS\5      r " GS GS\5      r " GS GS\5      r " GS GS\5      r " GS GS\5      r " GS GS\5      r " GS GS\5      r " GS GS\5      r " GS GS\5      r " GS GS\5      r " GS GS \5      r " GS! GS"\5      r " GS# GS$\5      r " GS% GS&\5      r " GS' GS(\5      r " GS) GS*\5      r " GS+ GS,\5      r " GS- GS.\5      r " GS/ GS0\5      rGS1 r\" \" 5        V s/ s H  o GR>                  U 4PM     sn 5      rGS2 rgs  sn f (3      )absolute_importNc                   0   ^  \ rS rSrSrSrU 4S jrSrU =r$ )
KafkaError   Fc                    > U R                   (       d  U R                  R                  $ SR                  U R                  R                  [        [
        U ]  5       5      $ )Nz{0}: {1})args	__class____name__formatsuperr   __str__selfr	   s    2/venv/lib/python3.13/site-packages/kafka/errors.pyr   KafkaError.__str__   sH    yy>>***  !8!8$Z>@B 	B     )	r
   
__module____qualname____firstlineno__	retriableinvalid_metadatar   __static_attributes____classcell__r	   s   @r   r   r      s    IB Br   r   c                       \ rS rSrSrSrg)	Cancelled   Tr   Nr
   r   r   r   r   r   r   r   r   r   r          Ir   r   c                   (   ^  \ rS rSrU 4S jrSrU =r$ )CommitFailedError   c                 :   > U(       d  Sn[         [        U ]
  " U6   g )N)zpCommit cannot be completed since the group has already rebalanced and assigned the partitions to another member.)r   r"   __init__)r   r   r	   s     r   r%   CommitFailedError.__init__   s    SD/6r   r   )r
   r   r   r   r%   r   r   r   s   @r   r"   r"      s    7 7r   r"   c                       \ rS rSrSrg)IllegalArgumentError   r   Nr
   r   r   r   r   r   r   r   r(   r(          r   r(   c                       \ rS rSrSrg)IllegalStateError#   r   Nr*   r   r   r   r-   r-   #   r+   r   r-   c                       \ rS rSrSrg)IncompatibleBrokerVersion'   r   Nr*   r   r   r   r0   r0   '   r+   r   r0   c                       \ rS rSrSrg)KafkaConfigurationError+   r   Nr*   r   r   r   r3   r3   +   r+   r   r3   c                       \ rS rSrSrSrSrg)KafkaConnectionError/   Tr   Nr
   r   r   r   r   r   r   r   r   r   r6   r6   /       Ir   r6   c                       \ rS rSrSrSrg)KafkaProtocolError4   Tr   Nr   r   r   r   r;   r;   4   r    r   r;   c                       \ rS rSrSrSrg)CorrelationIdError8   Tr   Nr   r   r   r   r>   r>   8   r    r   r>   c                       \ rS rSrSrSrg)KafkaTimeoutError<   Tr   Nr   r   r   r   rA   rA   <   r    r   rA   c                       \ rS rSrSrSrg)MetadataEmptyBrokerList@   Tr   Nr   r   r   r   rD   rD   @   r    r   rD   c                       \ rS rSrSrSrSrg)NoBrokersAvailableD   Tr   Nr8   r   r   r   rG   rG   D   r9   r   rG   c                       \ rS rSrSrg)NoOffsetForPartitionErrorI   r   Nr*   r   r   r   rJ   rJ   I   r+   r   rJ   c                       \ rS rSrSrSrg)NodeNotReadyErrorM   Tr   Nr   r   r   r   rM   rM   M   r    r   rM   c                       \ rS rSrSrg)QuotaViolationErrorQ   r   Nr*   r   r   r   rP   rP   Q   r+   r   rP   c                       \ rS rSrSrSrSrg)StaleMetadataU   Tr   Nr8   r   r   r   rS   rS   U   r9   r   rS   c                       \ rS rSrSrSrg)TooManyInFlightRequestsZ   Tr   Nr   r   r   r   rV   rV   Z   r    r   rV   c                       \ rS rSrSrg)UnrecognizedBrokerVersion^   r   Nr*   r   r   r   rY   rY   ^   r+   r   rY   c                       \ rS rSrSrg)UnsupportedCodecErrorb   r   Nr*   r   r   r   r\   r\   b   r+   r   r\   c                   4   ^  \ rS rSrSrSrSrU 4S jrSrU =r	$ )BrokerResponseErrorf   Nc                 \   > SR                  U R                  [        [        U ]  5       5      $ )z$Add errno to standard KafkaError strz[Error {0}] {1})r   errnor   r_   r   r   s    r   r   BrokerResponseError.__str__k   s+     ''JJ%t468 	8r   r   )
r
   r   r   r   rb   messagedescriptionr   r   r   r   s   @r   r_   r_   f   s    EGK8 8r   r_   c                       \ rS rSrSrg)AuthorizationErrorr   r   Nr*   r   r   r   rg   rg   r   r+   r   rg   c                        \ rS rSrSrSrSrSrg)NoErrorv   r   NO_ERRORzNo error--it worked!r   Nr
   r   r   r   rb   rd   re   r   r   r   r   rj   rj   v   s    EG(Kr   rj   c                        \ rS rSrSrSrSrSrg)UnknownError|   UNKNOWNzAn unexpected server error.r   Nrm   r   r   r   ro   ro   |   s    EG/Kr   ro   c                        \ rS rSrSrSrSrSrg)OffsetOutOfRangeError      OFFSET_OUT_OF_RANGEzlThe requested offset is outside the range of offsets maintained by the server for the given topic/partition.r   Nrm   r   r   r   rt   rt      s    E#GNKr   rt   c                        \ rS rSrSrSrSrSrg)CorruptRecordError      CORRUPT_MESSAGEzZThis message has failed its CRC checksum, exceeds the valid size, or is otherwise corrupt.r   Nrm   r   r   r   ry   ry      s    EG;Kr   ry   c                   (    \ rS rSrSrSrSrSrSrSr	g)UnknownTopicOrPartitionError      UNKNOWN_TOPIC_OR_PARTITIONzLThis request is for a topic or partition that does not exist on this broker.Tr   N
r
   r   r   r   rb   rd   re   r   r   r   r   r   r   r~   r~      s    E*G,KIr   r~   c                        \ rS rSrSrSrSrSrg)InvalidFetchRequestError      INVALID_FETCH_SIZEz The message has a negative size.r   Nrm   r   r   r   r   r      s    E"G4Kr   r   c                   (    \ rS rSrSrSrSrSrSrSr	g)LeaderNotAvailableError      LEADER_NOT_AVAILABLEzThis error is thrown if we are in the middle of a leadership election and there is currently no leader for this partition and hence it is unavailable for writes.Tr   Nr   r   r   r   r   r      s!    E$GMK Ir   r   c                   (    \ rS rSrSrSrSrSrSrSr	g)NotLeaderForPartitionError      NOT_LEADER_FOR_PARTITIONzThis error is thrown if the client attempts to send messages to a replica that is not the leader for some partition. It indicates that the clients metadata is out of date.Tr   Nr   r   r   r   r   r      s     E(GK Ir   r   c                   $    \ rS rSrSrSrSrSrSrg)RequestTimedOutError   r   REQUEST_TIMED_OUTzYThis error is thrown if the request exceeds the user-specified time limit in the request.Tr   N	r
   r   r   r   rb   rd   re   r   r   r   r   r   r   r      s    E!G@KIr   r   c                        \ rS rSrSrSrSrSrg)BrokerNotAvailableError      BROKER_NOT_AVAILABLEzYThis is not a client facing error and is used mostly by tools when a broker is not alive.r   Nrm   r   r   r   r   r      s    E$G8Kr   r   c                   (    \ rS rSrSrSrSrSrSrSr	g)ReplicaNotAvailableError   	   REPLICA_NOT_AVAILABLEzLIf replica is expected on a broker, but is not (this can be safely ignored).Tr   Nr   r   r   r   r   r      s    E%G'KIr   r   c                        \ rS rSrSrSrSrSrg)MessageSizeTooLargeError   
   MESSAGE_SIZE_TOO_LARGEzThe server has a configurable maximum message size to avoid unbounded memory allocation. This error is thrown if the client attempt to produce a message larger than this maximum.r   Nrm   r   r   r   r   r      s    E&GKr   r   c                        \ rS rSrSrSrSrSrg)StaleControllerEpochError      STALE_CONTROLLER_EPOCHz7Internal error code for broker-to-broker communication.r   Nrm   r   r   r   r   r      s    E&GKKr   r   c                        \ rS rSrSrSrSrSrg)OffsetMetadataTooLargeError      OFFSET_METADATA_TOO_LARGEzKIf you specify a string larger than configured maximum for offset metadata.r   Nrm   r   r   r   r   r      s    E)G'Kr   r   c                   $    \ rS rSrSrSrSrSrSrg)NetworkExceptionError      NETWORK_EXCEPTIONTr   N)	r
   r   r   r   rb   rd   r   r   r   r   r   r   r   r      s    E!GIr   r   c                   $    \ rS rSrSrSrSrSrSrg)CoordinatorLoadInProgressError      COORDINATOR_LOAD_IN_PROGRESSz}The broker returns this error code for txn or group requests, when the coordinator is loading and hence cant process requestsTr   Nr   r   r   r   r   r      s    E,GVKIr   r   c                   $    \ rS rSrSrSrSrSrSrg)CoordinatorNotAvailableError      COORDINATOR_NOT_AVAILABLEzThe broker returns this error code for consumer and transaction requests if the offsets topic has not yet been created, or if the group/txn coordinator is not active.Tr   Nr   r   r   r   r   r      s    E)GBK Ir   r   c                   $    \ rS rSrSrSrSrSrSrg)NotCoordinatorError      NOT_COORDINATORzwThe broker returns this error code if it is not the correct coordinator for the specified consumer or transaction groupTr   Nr   r   r   r   r   r      s    EGRKIr   r   c                        \ rS rSrSrSrSrSrg)InvalidTopicErrori     INVALID_TOPICzFor a request which attempts to access an invalid topic (e.g. one which has an illegal name), or if an attempt is made to write to an internal topic (such as the consumer offsets topic).r   Nrm   r   r   r   r   r     s    EG/Kr   r   c                        \ rS rSrSrSrSrSrg)RecordListTooLargeErrori     RECORD_LIST_TOO_LARGEzTIf a message batch in a produce request exceeds the maximum configured segment size.r   Nrm   r   r   r   r   r     s    E%G/Kr   r   c                   $    \ rS rSrSrSrSrSrSrg)NotEnoughReplicasErrori  r   NOT_ENOUGH_REPLICASzReturned from a produce request when the number of in-sync replicas is lower than the configured minimum and requiredAcks is -1.Tr   Nr   r   r   r   r   r     s    E#G*K Ir   r   c                   $    \ rS rSrSrSrSrSrSrg)!NotEnoughReplicasAfterAppendErrori      NOT_ENOUGH_REPLICAS_AFTER_APPENDzwReturned from a produce request when the message was written to the log, but with fewer in-sync replicas than required.Tr   Nr   r   r   r   r   r     s    E0G K Ir   r   c                        \ rS rSrSrSrSrSrg)InvalidRequiredAcksErrori&     INVALID_REQUIRED_ACKSzkReturned from a produce request if the requested requiredAcks is invalid (anything other than -1, 1, or 0).r   Nrm   r   r   r   r   r   &  s    E%GQKr   r   c                        \ rS rSrSrSrSrSrg)IllegalGenerationErrori-     ILLEGAL_GENERATIONzReturned from group membership requests (such as heartbeats) when the generation id provided in the request is not the current generation.r   Nrm   r   r   r   r   r   -  s    E"G*Kr   r   c                        \ rS rSrSrSrSrSrg)InconsistentGroupProtocolErrori5  r#   INCONSISTENT_GROUP_PROTOCOLzReturned in join group when the member provides a protocol type or set of protocols which is not compatible with the current group.r   Nrm   r   r   r   r   r   5  s    E+G%Kr   r   c                        \ rS rSrSrSrSrSrg)InvalidGroupIdErrori=     INVALID_GROUP_IDz9Returned in join group when the groupId is empty or null.r   Nrm   r   r   r   r   r   =  s    E GMKr   r   c                        \ rS rSrSrSrSrSrg)UnknownMemberIdErroriC     UNKNOWN_MEMBER_IDzzReturned from group requests (offset commits/fetches, heartbeats, etc) when the memberId is not in the current generation.r   Nrm   r   r   r   r   r   C  s    E!G"Kr   r   c                        \ rS rSrSrSrSrSrg)InvalidSessionTimeoutErroriK     INVALID_SESSION_TIMEOUTzeReturn in join group when the requested session timeout is outside of the allowed range on the brokerr   Nrm   r   r   r   r   r   K  s    E'GAKr   r   c                        \ rS rSrSrSrSrSrg)RebalanceInProgressErroriR     REBALANCE_IN_PROGRESSzReturned in heartbeat requests when the coordinator has begun rebalancing the group. This indicates to the client that it should rejoin the group.r   Nrm   r   r   r   r   r   R  s    E%G7Kr   r   c                        \ rS rSrSrSrSrSrg)InvalidCommitOffsetSizeErroriZ     INVALID_COMMIT_OFFSET_SIZEzUThis error indicates that an offset commit was rejected because of oversize metadata.r   Nrm   r   r   r   r   r   Z  s    E*G4Kr   r   c                        \ rS rSrSrSrSrSrg)TopicAuthorizationFailedErroria     TOPIC_AUTHORIZATION_FAILEDzWReturned by the broker when the client is not authorized to access the requested topic.r   Nrm   r   r   r   r   r   a  s    E*G2Kr   r   c                        \ rS rSrSrSrSrSrg)GroupAuthorizationFailedErrorih     GROUP_AUTHORIZATION_FAILEDzXReturned by the broker when the client is not authorized to access a particular groupId.r   Nrm   r   r   r   r   r   h  s    E*G3Kr   r   c                        \ rS rSrSrSrSrSrg)ClusterAuthorizationFailedErrorio  r)   CLUSTER_AUTHORIZATION_FAILEDzfReturned by the broker when the client is not authorized to use an inter-broker or administrative API.r   Nrm   r   r   r   r   r   o  s    E,GAKr   r   c                        \ rS rSrSrSrSrSrg)InvalidTimestampErroriv      INVALID_TIMESTAMPz8The timestamp of the message is out of acceptable range.r   Nrm   r   r   r   r   r   v  s    E!GLKr   r   c                        \ rS rSrSrSrSrSrg)UnsupportedSaslMechanismErrori|  !   UNSUPPORTED_SASL_MECHANISMz9The broker does not support the requested SASL mechanism.r   Nrm   r   r   r   r  r  |  s    E*GMKr   r  c                        \ rS rSrSrSrSrSrg)IllegalSaslStateErrori  "   ILLEGAL_SASL_STATEz2Request is not valid given the current SASL state.r   Nrm   r   r   r   r  r    s    E"GFKr   r  c                        \ rS rSrSrSrSrSrg)UnsupportedVersionErrori  r.   UNSUPPORTED_VERSIONz$The version of API is not supported.r   Nrm   r   r   r   r
  r
    s    E#G8Kr   r
  c                        \ rS rSrSrSrSrSrg)TopicAlreadyExistsErrori  $   TOPIC_ALREADY_EXISTSz$Topic with this name already exists.r   Nrm   r   r   r   r  r    s    E$G8Kr   r  c                        \ rS rSrSrSrSrSrg)InvalidPartitionsErrori  %   INVALID_PARTITIONSz Number of partitions is invalid.r   Nrm   r   r   r   r  r    s    E"G4Kr   r  c                        \ rS rSrSrSrSrSrg)InvalidReplicationFactorErrori  &   INVALID_REPLICATION_FACTORzReplication-factor is invalid.r   Nrm   r   r   r   r  r    s    E*G2Kr   r  c                        \ rS rSrSrSrSrSrg)!InvalidReplicationAssignmentErrori  r1   INVALID_REPLICATION_ASSIGNMENTz"Replication assignment is invalid.r   Nrm   r   r   r   r  r    s    E.G6Kr   r  c                        \ rS rSrSrSrSrSrg)InvalidConfigurationErrori  (   INVALID_CONFIGzConfiguration is invalid.r   Nrm   r   r   r   r  r    s    EG-Kr   r  c                   $    \ rS rSrSrSrSrSrSrg)NotControllerErrori  )   NOT_CONTROLLERz4This is not the correct controller for this cluster.Tr   Nr   r   r   r   r   r     s    EGHKIr   r   c                        \ rS rSrSrSrSrSrg)InvalidRequestErrori  *   INVALID_REQUESTzThis most likely occurs because of a request being malformed by the client library or the message was sent to an incompatible broker. See the broker logs for more details.r   Nrm   r   r   r   r$  r$    s    EG(Kr   r$  c                        \ rS rSrSrSrSrSrg) UnsupportedForMessageFormatErrori  r4   UNSUPPORTED_FOR_MESSAGE_FORMATzGThe message format version on the broker does not support this request.r   Nrm   r   r   r   r(  r(    s    E.G,Kr   r(  c                   $    \ rS rSrSrSrSrSrSrg)PolicyViolationErrori  ,   POLICY_VIOLATIONz8Request parameters do not satisfy the configured policy.Fr   Nr   r   r   r   r+  r+    s    E GLKIr   r+  c                   $    \ rS rSrSrSrSrSrSrg)OutOfOrderSequenceNumberErrori  -   OUT_OF_ORDER_SEQUENCE_NUMBERz4The broker received an out of order sequence number.Fr   Nr   r   r   r   r/  r/    s    E,GHKIr   r/  c                   $    \ rS rSrSrSrSrSrSrg)DuplicateSequenceNumberErrori  .   DUPLICATE_SEQUENCE_NUMBERz0The broker received a duplicate sequence number.Fr   Nr   r   r   r   r3  r3    s    E)GDKIr   r3  c                   $    \ rS rSrSrSrSrSrSrg)InvalidProducerEpochErrori  r7   INVALID_PRODUCER_EPOCHz0Producer attempted to produce with an old epoch.Fr   Nr   r   r   r   r7  r7    s    E&GDKIr   r7  c                   $    \ rS rSrSrSrSrSrSrg)InvalidTxnStateErrori  0   INVALID_TXN_STATEzEThe producer attempted a transactional operation in an invalid state.Fr   Nr   r   r   r   r:  r:    s    E!GYKIr   r:  c                   $    \ rS rSrSrSrSrSrSrg)InvalidProducerIdMappingErrori  1   INVALID_PRODUCER_ID_MAPPINGzdThe producer attempted to use a producer id which is not currently assigned to its transactional id.Fr   Nr   r   r   r   r>  r>    s    E+GxKIr   r>  c                   $    \ rS rSrSrSrSrSrSrg)InvalidTransactionTimeoutErrori  2   INVALID_TRANSACTION_TIMEOUTz}The transaction timeout is larger than the maximum value allowed by the broker (as configured by transaction.max.timeout.ms).Fr   Nr   r   r   r   rB  rB    s    E+G RKIr   rB  c                   $    \ rS rSrSrSrSrSrSrg)ConcurrentTransactionsErrori  3   CONCURRENT_TRANSACTIONSzvThe producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing.Tr   Nr   r   r   r   rF  rF    s    E'G KKIr   rF  c                   $    \ rS rSrSrSrSrSrSrg)!TransactionCoordinatorFencedErrori  r<   TRANSACTION_COORDINATOR_FENCEDz~Indicates that the transaction coordinator sending a WriteTxnMarker is no longer the current coordinator for a given producer.Fr   Nr   r   r   r   rJ  rJ    s    E.G SKIr   rJ  c                   $    \ rS rSrSrSrSrSrSrg)'TransactionalIdAuthorizationFailedErrori  5   %TRANSACTIONAL_ID_AUTHORIZATION_FAILEDz&Transactional Id authorization failed.Fr   Nr   r   r   r   rM  rM        E5G:KIr   rM  c                   $    \ rS rSrSrSrSrSrSrg)SecurityDisabledErrori	  6   SECURITY_DISABLEDzSecurity features are disabled.Fr   Nr   r   r   r   rR  rR  	  s    E!G3KIr   rR  c                   $    \ rS rSrSrSrSrSrSrg)OperationNotAttemptedErrori  7   OPERATION_NOT_ATTEMPTEDzThe broker did not attempt to execute this operation. This may happen for batched RPCs where some operations in the batch failed, causing the broker to respond without trying the rest.Fr   Nr   r   r   r   rV  rV    s    E'G MKIr   rV  c                   (    \ rS rSrSrSrSrSrSrSr	g)KafkaStorageErrori  r?   KAFKA_STORAGE_ERRORz6Disk error when trying to access log file on the disk.Tr   Nr   r   r   r   rZ  rZ    s    E#GJKIr   rZ  c                   $    \ rS rSrSrSrSrSrSrg)LogDirNotFoundErrori  9   LOG_DIR_NOT_FOUNDzCThe user-specified log directory is not found in the broker config.Fr   Nr   r   r   r   r]  r]    s    E!GWKIr   r]  c                   $    \ rS rSrSrSrSrSrSrg)SaslAuthenticationFailedErrori&  :   SASL_AUTHENTICATION_FAILEDzSASL Authentication failed.Fr   Nr   r   r   r   ra  ra  &  s    E*G/KIr   ra  c                   $    \ rS rSrSrSrSrSrSrg)UnknownProducerIdErrori-  ;   UNKNOWN_PRODUCER_IDa  This exception is raised by the broker if it could not locate the producer metadata associated with the producerId in question. This could happen if, for instance, the producer's records were deleted because their retention time had elapsed. Once the last records of the producerId are removed, the producer's metadata is removed from the broker, and future appends by the producer will return this exception.Fr   Nr   r   r   r   re  re  -  s    E#G pKIr   re  c                   $    \ rS rSrSrSrSrSrSrg)ReassignmentInProgressErrori4  rB   REASSIGNMENT_IN_PROGRESSz(A partition reassignment is in progress.Fr   Nr   r   r   r   ri  ri  4  s    E(G<KIr   ri  c                   $    \ rS rSrSrSrSrSrSrg) DelegationTokenAuthDisabledErrori;  =   DELEGATION_TOKEN_AUTH_DISABLEDz(Delegation Token feature is not enabled.Fr   Nr   r   r   r   rl  rl  ;  s    E.G<KIr   rl  c                   $    \ rS rSrSrSrSrSrSrg)DelegationTokenNotFoundErroriB  >   DELEGATION_TOKEN_NOT_FOUNDz(Delegation Token is not found on server.Fr   Nr   r   r   r   rp  rp  B  s    E*G<KIr   rp  c                   $    \ rS rSrSrSrSrSrSrg)!DelegationTokenOwnerMismatchErroriI  ?   DELEGATION_TOKEN_OWNER_MISMATCHz/Specified Principal is not valid Owner/Renewer.Fr   Nr   r   r   r   rt  rt  I  s    E/GCKIr   rt  c                   $    \ rS rSrSrSrSrSrSrg)%DelegationTokenRequestNotAllowedErroriP  rE   $DELEGATION_TOKEN_REQUEST_NOT_ALLOWEDzyDelegation Token requests are not allowed on PLAINTEXT/1-way SSL channels and on delegation token authenticated channels.Fr   Nr   r   r   r   rx  rx  P  s    E4G NKIr   rx  c                   $    \ rS rSrSrSrSrSrSrg)'DelegationTokenAuthorizationFailedErroriW  A   %DELEGATION_TOKEN_AUTHORIZATION_FAILEDz&Delegation Token authorization failed.Fr   Nr   r   r   r   r{  r{  W  rP  r   r{  c                   $    \ rS rSrSrSrSrSrSrg)DelegationTokenExpiredErrori^  B   DELEGATION_TOKEN_EXPIREDzDelegation Token is expired.Fr   Nr   r   r   r   r  r  ^  s    E(G0KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)InvalidPrincipalTypeErrorie  C   INVALID_PRINCIPAL_TYPEz(Supplied principalType is not supported.Fr   Nr   r   r   r   r  r  e  s    E&G<KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)NonEmptyGroupErroril  rH   NON_EMPTY_GROUPzThe group is not empty.Fr   Nr   r   r   r   r  r  l  s    EG+KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)GroupIdNotFoundErroris  E   GROUP_ID_NOT_FOUNDzThe group id does not exist.Fr   Nr   r   r   r   r  r  s  s    E"G0KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)FetchSessionIdNotFoundErroriz  F   FETCH_SESSION_ID_NOT_FOUNDz#The fetch session ID was not found.Tr   Nr   r   r   r   r  r  z  s    E*G7KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)InvalidFetchSessionEpochErrori  G   INVALID_FETCH_SESSION_EPOCHz#The fetch session epoch is invalid.Tr   Nr   r   r   r   r  r    s    E+G7KIr   r  c                   (    \ rS rSrSrSrSrSrSrSr	g)ListenerNotFoundErrori  H   LISTENER_NOT_FOUNDzlThere is no listener on the leader broker that matches the listener on which metadata request was processed.Tr   Nr   r   r   r   r  r    s    E"G AKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)TopicDeletionDisabledErrori  rK   TOPIC_DELETION_DISABLEDzTopic deletion is disabled.Fr   Nr   r   r   r   r  r    s    E'G/KIr   r  c                   (    \ rS rSrSrSrSrSrSrSr	g)FencedLeaderEpochErrori  J   FENCED_LEADER_EPOCHzFThe leader epoch in the request is older than the epoch on the broker.Tr   Nr   r   r   r   r  r    s    E#GZKIr   r  c                   (    \ rS rSrSrSrSrSrSrSr	g)UnknownLeaderEpochErrori  K   UNKNOWN_LEADER_EPOCHzFThe leader epoch in the request is newer than the epoch on the broker.Tr   Nr   r   r   r   r  r    s    E$GZKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)UnsupportedCompressionTypeErrori  L   UNSUPPORTED_COMPRESSION_TYPEzOThe requesting client does not support the compression type of given partition.Fr   Nr   r   r   r   r  r    s    E,GcKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)StaleBrokerEpochErrori  rN   STALE_BROKER_EPOCHzBroker epoch has changed.Fr   Nr   r   r   r   r  r    s    E"G-KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)OffsetNotAvailableErrori  N   OFFSET_NOT_AVAILABLEzThe leader high watermark has not caught up from a recent leader election so the offsets cannot be guaranteed to be monotonically increasing.Tr   Nr   r   r   r   r  r    s    E$G bKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)MemberIdRequiredErrori  O   MEMBER_ID_REQUIREDz[The group member needs to have a valid member id before actually entering a consumer group.Fr   Nr   r   r   r   r  r    s    E"GoKIr   r  c                   (    \ rS rSrSrSrSrSrSrSr	g) PreferredLeaderNotAvailableErrori  P   PREFERRED_LEADER_NOT_AVAILABLEz'The preferred leader was not available.Tr   Nr   r   r   r   r  r    s    E.G;KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)GroupMaxSizeReachedErrori  rQ   GROUP_MAX_SIZE_REACHEDz,The consumer group has reached its max size.Fr   Nr   r   r   r   r  r    s    E&G@KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)FencedInstanceIdErrori  R   FENCED_INSTANCE_IDzThe broker rejected this static consumer since another consumer with the same group.instance.id has registered with a different member.id.Fr   Nr   r   r   r   r  r    s    E"G _KIr   r  c                   (    \ rS rSrSrSrSrSrSrSr	g) EligibleLeadersNotAvailableErrori  S   ELIGIBLE_LEADERS_NOT_AVAILABLEz3Eligible topic partition leaders are not available.Tr   Nr   r   r   r   r  r    s    E.GGKIr   r  c                   (    \ rS rSrSrSrSrSrSrSr	g)ElectionNotNeededErrori  T   ELECTION_NOT_NEEDEDz/Leader election not needed for topic partition.Tr   Nr   r   r   r   r  r    s    E#GCKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)NoReassignmentInProgressErrori  rT   NO_REASSIGNMENT_IN_PROGRESSz)No partition reassignment is in progress.Fr   Nr   r   r   r   r  r    s    E+G=KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)GroupSubscribedToTopicErrori  V   GROUP_SUBSCRIBED_TO_TOPICz_Deleting offsets of a topic is forbidden while the consumer group is actively subscribed to it.Fr   Nr   r   r   r   r  r    s    E)GsKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)InvalidRecordErrori  W   INVALID_RECORDzKThis record has failed the validation on broker and hence will be rejected.Fr   Nr   r   r   r   r  r    s    EG_KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)UnstableOffsetCommitErrori  X   UNSTABLE_OFFSET_COMMITz3There are unstable offsets that need to be cleared.Tr   Nr   r   r   r   r  r    s    E&GGKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)ThrottlingQuotaExceededErrori  Y   THROTTLING_QUOTA_EXCEEDEDz'The throttling quota has been exceeded.Tr   Nr   r   r   r   r  r    s    E)G;KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)ProducerFencedErrori  rW   PRODUCER_FENCEDzUThere is a newer producer with the same transactionalId which fences the current one.Fr   Nr   r   r   r   r  r    s    EGiKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)ResourceNotFoundErrori  [   RESOURCE_NOT_FOUNDz?A request illegally referred to a resource that does not exist.Fr   Nr   r   r   r   r  r    s    E"GSKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)DuplicateResourceErrori  \   DUPLICATE_RESOURCEz8A request illegally referred to the same resource twice.Fr   Nr   r   r   r   r  r    s    E"GLKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)UnacceptableCredentialErrori!  ]   UNACCEPTABLE_CREDENTIALz?Requested credential would not meet criteria for acceptability.Fr   Nr   r   r   r   r  r  !  s    E'GSKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)InconsistentVoterSetErrori(  rZ   INCONSISTENT_VOTER_SETzlIndicates that the either the sender or recipient of a voter-only request is not one of the expected voters.Fr   Nr   r   r   r   r  r  (  s    E&G AKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)InvalidUpdateVersionErrori/  _   INVALID_UPDATE_VERSIONz%The given update version was invalid.Fr   Nr   r   r   r   r  r  /  s    E&G9KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)FeatureUpdateFailedErrori6  `   FEATURE_UPDATE_FAILEDzFUnable to update finalized features due to an unexpected server error.Fr   Nr   r   r   r   r  r  6  s    E%GZKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)$PrincipalDeserializationFailureErrori=  a   !PRINCIPAL_DESERIALIZATION_FAILUREzRequest principal deserialization failed during forwarding. This indicates an internal error on the broker cluster security setup.Fr   Nr   r   r   r   r  r  =  s    E1G WKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)SnapshotNotFoundErroriD  r]   SNAPSHOT_NOT_FOUNDz!Requested snapshot was not found.Fr   Nr   r   r   r   r  r  D  s    E"G5KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)PositionOutOfRangeErroriK  c   POSITION_OUT_OF_RANGEz`Requested position is not greater than or equal to zero, and less than the size of the snapshot.Fr   Nr   r   r   r   r  r  K  s    E%GtKIr   r  c                   (    \ rS rSrSrSrSrSrSrSr	g)UnknownTopicIdErroriR  d   UNKNOWN_TOPIC_IDz(This server does not host this topic ID.Tr   Nr   r   r   r   r  r  R  s    E G<KIr   r  c                   $    \ rS rSrSrSrSrSrSrg) DuplicateBrokerRegistrationErroriZ  e   DUPLICATE_BROKER_REGISTRATIONz!This broker ID is already in use.Fr   Nr   r   r   r   r  r  Z  s    E-G5KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)BrokerIdNotRegisteredErroria  r`   BROKER_ID_NOT_REGISTEREDz'The given broker ID was not registered.Fr   Nr   r   r   r   r  r  a  s    E(G;KIr   r  c                   (    \ rS rSrSrSrSrSrSrSr	g)InconsistentTopicIdErrorih  g   INCONSISTENT_TOPIC_IDz=The log's topic ID did not match the topic ID in the request.Tr   Nr   r   r   r   r
  r
  h  s    E%GRKIr   r
  c                   $    \ rS rSrSrSrSrSrSrg)InconsistentClusterIdErrorip  h   INCONSISTENT_CLUSTER_IDzEThe clusterId in the request does not match that found on the server.Fr   Nr   r   r   r   r  r  p  s    E'GYKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)TransactionalIdNotFoundErroriw  i   TRANSACTIONAL_ID_NOT_FOUNDz'The transactionalId could not be found.Fr   Nr   r   r   r   r  r  w  s    E*G;KIr   r  c                   $    \ rS rSrSrSrSrSrSrg)FetchSessionTopicIdErrori~  j   FETCH_SESSION_TOPIC_ID_ERRORz:The fetch session encountered inconsistent topic ID usage.Tr   Nr   r   r   r   r  r  ~  s    E,GNKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)IneligibleReplicaErrori  k   INELIGIBLE_REPLICAz5The new ISR contains at least one ineligible replica.Fr   Nr   r   r   r   r  r    s    E"GIKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)NewLeaderElectedErrori  l   NEW_LEADER_ELECTEDz_The AlterPartition request successfully updated the partition state but the leader has changed.Fr   Nr   r   r   r   r  r    s    E"GsKIr   r  c                   $    \ rS rSrSrSrSrSrSrg)OffsetMovedToTieredStorageErrori  m   OFFSET_MOVED_TO_TIERED_STORAGEz0The requested offset is moved to tiered storage.Fr   Nr   r   r   r   r"  r"    s    E.GDKIr   r"  c                   $    \ rS rSrSrSrSrSrSrg)FencedMemberEpochErrori  n   FENCED_MEMBER_EPOCHzkThe member epoch is fenced by the group coordinator. The member must abandon all its partitions and rejoin.Fr   Nr   r   r   r   r&  r&    s    E#GKIr   r&  c                   $    \ rS rSrSrSrSrSrSrg)UnreleasedInstanceIdErrori  o   UNRELEASED_INSTANCE_IDzdThe instance ID is still used by another member in the consumer group. That member must leave first.Fr   Nr   r   r   r   r*  r*    s    E&GxKIr   r*  c                   $    \ rS rSrSrSrSrSrSrg)UnsupportedAssignorErrori  p   UNSUPPORTED_ASSIGNORzIThe assignor or its version range is not supported by the consumer group.Fr   Nr   r   r   r   r.  r.    s    E$G]KIr   r.  c                   $    \ rS rSrSrSrSrSrSrg)StaleMemberEpochErrori  q   STALE_MEMBER_EPOCHz}The member epoch is stale. The member must retry after receiving its updated member epoch via the ConsumerGroupHeartbeat API.Fr   Nr   r   r   r   r2  r2    s    E"G RKIr   r2  c                   $    \ rS rSrSrSrSrSrSrg)MismatchedEndpointTypeErrori  rh   MISMATCHED_ENDPOINT_TYPEz6The request was sent to an endpoint of the wrong type.Fr   Nr   r   r   r   r6  r6    s    E(GJKIr   r6  c                   $    \ rS rSrSrSrSrSrSrg)UnsupportedEndpointTypeErrori  s   UNSUPPORTED_ENDPOINT_TYPEz(This endpoint type is not supported yet.Fr   Nr   r   r   r   r9  r9    s    E)G<KIr   r9  c                   $    \ rS rSrSrSrSrSrSrg)UnknownControllerIdErrori  t   UNKNOWN_CONTROLLER_IDz This controller ID is not known.Fr   Nr   r   r   r   r=  r=    s    E%G4KIr   r=  c                   $    \ rS rSrSrSrSrSrSrg)UnknownSubscriptionIdErrori  u   UNKNOWN_SUBSCRIPTION_IDzQClient sent a push telemetry request with an invalid or outdated subscription ID.Fr   Nr   r   r   r   rA  rA    s    E'GeKIr   rA  c                   $    \ rS rSrSrSrSrSrSrg)TelemetryTooLargeErrori  rk   TELEMETRY_TOO_LARGEzYClient sent a push telemetry request larger than the maximum size the broker will accept.Fr   Nr   r   r   r   rE  rE    s    E#GmKIr   rE  c                   $    \ rS rSrSrSrSrSrSrg)InvalidRegistrationErrori  w   INVALID_REGISTRATIONzDThe controller has considered the broker registration to be invalid.Fr   Nr   r   r   r   rH  rH    s    E$GXKIr   rH  c                   $    \ rS rSrSrSrSrSrSrg)TransactionAbortableErrori  x   TRANSACTION_ABORTABLEzThe server encountered an error with the transaction. The client can abort the transaction to continue using this transactional ID.Fr   Nr   r   r   r   rL  rL    s    E%G XKIr   rL  c                   $    \ rS rSrSrSrSrSrSrg)InvalidRecordStateErrori  y   INVALID_RECORD_STATEzTThe record state is invalid. The acknowledgement of delivery could not be completed.Fr   Nr   r   r   r   rP  rP    s    E$GhKIr   rP  c                   $    \ rS rSrSrSrSrSrSrg)ShareSessionNotFoundErrori  z   SHARE_SESSION_NOT_FOUNDz The share session was not found.Tr   Nr   r   r   r   rT  rT    s    E'G4KIr   rT  c                   $    \ rS rSrSrSrSrSrSrg)InvalidShareSessionEpochErrori  {   INVALID_SHARE_SESSION_EPOCHz#The share session epoch is invalid.Tr   Nr   r   r   r   rX  rX    s    E+G7KIr   rX  c                   $    \ rS rSrSrSrSrSrSrg)FencedStateEpochErrori  rp   FENCED_STATE_EPOCHz]The share coordinator rejected the request because the share-group state epoch did not match.Fr   Nr   r   r   r   r\  r\    s    E"GqKIr   r\  c                   $    \ rS rSrSrSrSrSrSrg)InvalidVoterKeyErrori  }   INVALID_VOTER_KEYz8The voter key doesn't match the receiving replica's key.Fr   Nr   r   r   r   r_  r_    s    E!GNKIr   r_  c                   $    \ rS rSrSrSrSrSrSrg)DuplicateVoterErrori
  ~   DUPLICATE_VOTERz/The voter is already part of the set of voters.Fr   Nr   r   r   r   rc  rc  
  s    EGCKIr   rc  c                   $    \ rS rSrSrSrSrSrSrg)VoterNotFoundErrori     VOTER_NOT_FOUNDz+The voter is not part of the set of voters.Fr   Nr   r   r   r   rg  rg    s    EG?KIr   rg  c               #      #    [         R                  " [        R                  [           5       HI  u  p[         R
                  " U5      (       d  M"  [        U[        5      (       d  M9  U[        :w  d  ME  Uv   MK     g 7f)N)inspect
getmemberssysmodulesr
   isclass
issubclassr_   )nameobjs     r   _iter_broker_errorsrs    sN     ''H(=>	??3Js4G$H$HSTgMgI ?s   A
A<A<'A<3	A<c                 P    U [         ;   a	  [         U    $ [        S[        4SU 05      $ )NUnrecognizedBrokerErrorrb   )kafka_errorstypero   )
error_codes    r   for_codery  !  s.    \!J'' -*@UVVr   )
__future__r   rk  rm  RuntimeErrorr   r   r"   r(   r-   r0   r3   r6   r;   r>   rA   rD   rG   rJ   rM   rP   rS   rV   rY   r\   r_   rg   rj   ro   rt   ry   CorruptRecordExceptionr~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r
  r  r  r  r  r  r   r$  r(  r+  r/  r3  r7  r:  r>  rB  rF  rJ  rM  rR  rV  rZ  r]  ra  re  ri  rl  rp  rt  rx  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r
  r  r  r  r  r  r"  r&  r*  r.  r2  r6  r9  r=  rA  rE  rH  rL  rP  rT  rX  r\  r_  rc  rg  rs  dictrb   rv  ry  )xs   0r   <module>r     s   &  
	B 	B
 7
 7	: 		
 		
 		j 	: 
 + 
 j  
	
 	
 	* 	J 
j 	
 		J 		8* 	8	, 	)! )0& 0O/ O<, < , #6 52 51 !4 . 91 92  2  L 3 L("5 (/ %8 #6 - 0+ 001 00 (; R2 R+0 +&%8 &N- N#. #B!4 B82 85#6 53$6 34$6 4B&8 BM/ MN$7 NG/ G91 991 950 53$7 37(; 7. 3 ., )- )-': -. $7 #6  3 . $7 %8 "5 (; .@ / !4 + - $7 0 "5 ': #6 (; ,? .@ "5  3 , . "5 $7 / !4 0 1 &9 / 1 / ': 2 / ': 0 $7 "5 ,  3 #6 - / 0 "5  3  3 2 +> / 1 - ': !4 2 !4 #6 2 0 / &9 0  3 2 / "5 #6 2 !4 0 2  3 1  3 $7 / . - ,  +>+@A+@aggq\+@AB	W Bs   [2