open_transactions
Detect uncommitted Kafka transactions blocking read_committed consumers on up to 100 topics, then report producer, offsets, and timeout to guide fixing the producer.
Instructions
Find open transactions holding back read_committed consumers on 1 to 100 topics in one call through items. A consumer with isolation.level=read_committed cannot read past the first message of a transaction that has not been committed or aborted, so a transactional producer that hangs or dies mid-transaction stalls every such consumer on that partition. In consumer_lag this looks exactly like a poison message: members present, nothing consumed.
For each topic, blocked says whether any partition's last stable offset trails its high watermark. Each such partition reports both offsets, how many messages read_committed consumers cannot see, and every producer with an open transaction there: producer id and epoch, the offset the transaction started at, and where the coordinator knows it, the transactional id (which names the application), state, when it started, how long it has been open and its timeout, after which the broker aborts it.
The fix is in the producer, not the consumer: restart or fence the producing application, or wait for the timeout. Skipping offsets does not help. Results follow items order, each carrying index with result or error. Needs DESCRIBE on the topic and on transactional ids.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | The topics to check, 1 to 100 of them. Checking one topic is an array of length one. Results follow this order and a missing topic is reported against its own item. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| atomic | Yes | ||
| failed | Yes | ||
| applied | Yes | ||
| results | Yes | ||
| succeeded | Yes |