Skip to content

Commit

Permalink
Trigger op callbacks regardless for unhandled types in consume_batch_…
Browse files Browse the repository at this point in the history
…queue() et.al.

Backport of confluentinc@bead2e4

Note that changes in `CHANGELOG.md` and tests are not included here.

Fixes ClickHouse/ClickHouse#38151
  • Loading branch information
racevedoo committed Jun 17, 2022
1 parent b8554f1 commit f5f098d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/rdkafka.c
Original file line number Diff line number Diff line change
Expand Up @@ -3838,7 +3838,15 @@ rd_kafka_poll_cb (rd_kafka_t *rk, rd_kafka_q_t *rkq, rd_kafka_op_t *rko,
break;

default:
rd_kafka_assert(rk, !*"cant handle op type");
/* If op has a callback set (e.g., OAUTHBEARER_REFRESH),
* call it. */
if (rko->rko_type & RD_KAFKA_OP_CB) {
res = rd_kafka_op_call(rk, rkq, rko);
break;
}

RD_BUG("Can't handle op type %s (0x%x)",
rd_kafka_op2str(rko->rko_type), rko->rko_type);
break;
}

Expand Down

0 comments on commit f5f098d

Please sign in to comment.