DPM Kafka work
DPM Kafka work is in the Supervision › DPM Kafka work menu.
The dpm service gets its work over Kafka: each of its listeners reads a topic with one or more consumer threads. The page shows, live, “what each of dpm’s Kafka consumer threads is doing right now, for which tenant, and the messages waiting behind it”. It shows whether one tenant keeps another waiting, or whether a message is stuck.
The page changes nothing: it reads a snapshot dpm serves (see Events and calls). Like the whole console, it is for platform administrators only, and dpm checks it itself: when it refuses access, the page shows Not allowed (“dpm shows its Kafka work to platform admins only.”).
Live reading
The page reads dpm every 5 seconds while the browser tab is visible. The header shows:
- Live · every 5 s;
- Paused while the tab is hidden: no read while the tab is in the background;
- Stale: the last read failed; the page then shows the last snapshot received, with the time of the failure;
- Stopped: dpm refused access; reads stop until Refresh is clicked.
The snapshot’s time (“dpm snapshot at …”) shows next to it; Refresh reads at once.
When dpm does not answer, the page says why: “This dpm does not serve its Kafka work yet.”, “dpm could not be reached.” or “dpm answered with an error (…).”.
Totals
Three tiles sum up the snapshot:
- Busy threads: the busy threads out of the total, across every listener;
- Tenants served: the tenants a thread is working for right now;
- Waiting messages: the messages waiting, and on how many partitions.
Listeners
Each listener has its block, titled with its topic and its id, with its number of threads, busy threads and waiting messages. A coloured strip shows its threads: each tenant has its own hue, the same for its threads and for the partitions it holds. When dpm could not read a listener’s lag, the block shows “Lag unavailable: …”.
The threads table has these columns:
- Thread;
- State: Busy or Idle;
- Tenant: the tenant’s name, read from subscription’s list of tenants, or its id when it is not there;
- Message: the type of the message being handled;
- Task: the start of the task id; a button copies the whole id;
- Stage: where the handling stands;
- Elapsed: how long the thread has been on this message; it is flagged past 1 minute, then as stuck past 5 minutes;
- Partition: the partition and offset of the message.
An idle thread shows “Waiting for a message” and the partitions assigned to it.
Partitions
Under the table, each partition of the topic shows:
- the number of messages waiting;
- the committed offset and the end offset;
- who holds it: “queued behind tenant on thread” when messages are waiting, “thread on tenant” otherwise, or “No message being handled”.
The messages waiting on a partition are queued behind the message the thread holding it is handling. A partition with waiting messages, held by a thread whose Elapsed is flagged, therefore shows a long message holding others back, possibly other tenants’ ones.