SQLStreams

the messaging platform that is just Postgres

You last visited on 9999-99-99 Show what's new since then

consumer stopped [SQL0041]

Edit this page
code SQL0041 · log event at info — a lifecycle transition; the counters are the session's evidence, not a problem report
the log line · Report this thread
SQL0041 Log event at info

As it arrives in your log:

level=INFO msg="consumer stopped" code=SQL0041

A consumer instance logs this line once on every exit — clean stop and fatal-error teardown alike — summarizing what the process did between consumer starting and this line. Every counter prints even at zero, so the line’s shape never varies; zeros are the good news. The counters are this one process’s own totals, counted in memory as the work happened: they are flows (“what this instance did”), and never reconcile against the fleet-wide sqlstreams.consumer.* gauges (“what exists right now”).

duration is the session’s wall time. The counters:

  • claimed_count — messages this instance claimed, cursor ranges and exception retries together.
  • success_count — consumerFunc runs that completed cleanly. Counted at resolution, so it holds even when a lost lease means another worker re-ran the message later.
  • superseded_count — messages resolved without running because a newer version of their compacted message key had already arrived.
  • ready_count — delivery rows written 'ready': each will be retried once its backoff passes. A nonzero value is retry traffic, not lost work.
  • deferred_count — delivery rows written 'deferred' because another delivery held their message key; they re-enter through the exception window when the key frees.
  • dead_count — delivery rows this instance wrote 'dead': exhausted retries, unrecoverable payloads, and the crash-loop kill backstop. These rows sit dead-lettered until resolved.
  • reclaimed_count — leases this instance took over from expired workers. Nonzero means some other instance died or stalled mid-range.
  • quarantined_count — ranges that hit the reclaim cap and were written out as independent 'ready' exceptions instead of being handed out again.
  • abandoned_count — consumerFunc goroutines written off after the hard timeout; each left a goroutine running unreachably until it returned on its own. Preventable: Consumer Timeouts.
  • lease_lost_count — commits rejected because another worker had reclaimed the lease first. This instance’s work on those rows was redone elsewhere; nonzero means this process was too slow to record what it ran.

The flakiness story reads from the last four: a healthy session ends with reclaimed_count=0 quarantined_count=0 abandoned_count=0 lease_lost_count=0.

Nothing pasted yet — the queries above show their blanks.

Looking for a different code? Search every thread.