Skip to content

Commit 201c3fd

Browse files
beneschedenhill
authored andcommitted
Update error response codes
(cherry picked from commit 9b3fce7)
1 parent 392d317 commit 201c3fd

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

src-cpp/rdkafkacpp.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,22 @@ enum ErrorCode {
428428
ERR_LISTENER_NOT_FOUND = 72,
429429
/** Topic deletion is disabled */
430430
ERR_TOPIC_DELETION_DISABLED = 73,
431+
/** Leader epoch is older than broker epoch */
432+
ERR_FENCED_LEADER_EPOCH = 74,
433+
/** Leader epoch is newer than broker epoch */
434+
ERR_UNKNOWN_LEADER_EPOCH = 75,
431435
/** Unsupported compression type */
432-
ERR_UNSUPPORTED_COMPRESSION_TYPE = 74
436+
ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
437+
/** Broker epoch has changed */
438+
ERR_STALE_BROKER_EPOCH = 77,
439+
/** Leader high watermark is not caught up */
440+
ERR_OFFSET_NOT_AVAILABLE = 78,
441+
/** Group member needs a valid member ID */
442+
ERR_MEMBER_ID_REQUIRED = 79,
443+
/** Preferred leader was not available */
444+
ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
445+
/** Consumer group has reached maximum size */
446+
ERR_GROUP_MAX_SIZE_REACHED = 81,
433447
};
434448

435449

src/rdkafka.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,22 @@ static const struct rd_kafka_err_desc rd_kafka_err_descs[] = {
594594
"No matching listener"),
595595
_ERR_DESC(RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED,
596596
"Topic deletion is disabled"),
597+
_ERR_DESC(RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH,
598+
"Leader epoch is older than broker epoch"),
599+
_ERR_DESC(RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH,
600+
"Leader epoch is newer than broker epoch"),
597601
_ERR_DESC(RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE,
598602
"Unsupported compression type"),
603+
_ERR_DESC(RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH,
604+
"Broker epoch has changed"),
605+
_ERR_DESC(RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE,
606+
"Leader high watermark is not caught up"),
607+
_ERR_DESC(RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED,
608+
"Group member needs a valid member ID"),
609+
_ERR_DESC(RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE,
610+
"Preferred leader was not available"),
611+
_ERR_DESC(RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED,
612+
"Consumer group has reached maximum size"),
599613

600614
_ERR_DESC(RD_KAFKA_RESP_ERR__END, NULL)
601615
};

src/rdkafka.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,22 @@ typedef enum {
521521
RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
522522
/** Topic deletion is disabled */
523523
RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
524+
/** Leader epoch is older than broker epoch */
525+
RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
526+
/** Leader epoch is newer than broker epoch */
527+
RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
524528
/** Unsupported compression type */
525-
RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 74,
529+
RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
530+
/** Broker epoch has changed */
531+
RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
532+
/** Leader high watermark is not caught up */
533+
RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
534+
/** Group member needs a valid member ID */
535+
RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
536+
/** Preferred leader was not available */
537+
RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
538+
/** Consumer group has reached maximum size */
539+
RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
526540

527541
RD_KAFKA_RESP_ERR_END_ALL,
528542
} rd_kafka_resp_err_t;

0 commit comments

Comments
 (0)