Skip to content

feat(events producer): subgraph indexing agreement event emitter to send events to kafka#649

Merged
cmwhited merged 3 commits into
chris.whited/feat-producer/initial-crate-with-protofrom
chris.whited/feat-producer/kafka-config-producer
Jul 14, 2026
Merged

feat(events producer): subgraph indexing agreement event emitter to send events to kafka#649
cmwhited merged 3 commits into
chris.whited/feat-producer/initial-crate-with-protofrom
chris.whited/feat-producer/kafka-config-producer

Conversation

@cmwhited

Copy link
Copy Markdown
  • Exposes a kafka producer instance for sending messages on a given topic
  • Exposes a wrapper interface for sending Subgraph Indexing Agreement messages to the configured kafka producer, if enabled

@cmwhited cmwhited requested a review from MoonBoi9001 June 24, 2026 21:51
@MoonBoi9001 MoonBoi9001 added the agreement-events Kafka producer for agreement lifecycle events (Studio integration) label Jul 7, 2026
…emitter in callsites (#656)

* feat(events producer): implement subgraph indexing agreements events emitter in callsites

* feat(events producer): only emit n_indexer_unavailable once

* fix: correct expiry timestamps and a duplicated shortfall event (#658)

* fix(reassess): send shortfall event after the chain-time read

The "not enough indexers" event was sent before the step that reads chain time to
stamp deadlines. In local runs that read can fail and retry the whole job, resending
the event each round; sending it after the read makes a retried round emit it once.

* fix(expiration): report proposal time from the deadline clock

The expiry event mixed clocks: "proposed at" came from wall time, "expired at" from
chain time, so with local time controls on, expiry could look earlier than the proposal.
Agreements now stamp proposal time in the deadline's clock; old rows fall back to created_at.

* feat(events producer): PR review. hardening. atomic retries. error and app shutdown handling

* fix: announce agreement events promptly and pause on outages (#670)

* fix(listener): announce agreement events on every chain poll

A recovery sweep running only every 60th poll was the sole emitter of the accepted,
terminated and expired announcements, delaying each by 30 minutes while polling fast and
up to 5 hours once the last live agreement was cancelled. Run those three every poll.

* fix(listener): pause event sweeps briefly after a Kafka send failure

Now that the accepted, terminated and expired announcements sweep every poll, a hung Kafka
broker made each of the 3 sweeps block on its 30-second send, stalling chain polling every
poll. After a failed send the sweeps now back off from 30 seconds up to 300 before retrying.

---------

Co-authored-by: MoonBoi9001 <67825802+MoonBoi9001@users.noreply.github.com>
@cmwhited cmwhited merged commit 98c254a into chris.whited/feat-producer/initial-crate-with-proto Jul 14, 2026
11 checks passed
@cmwhited cmwhited deleted the chris.whited/feat-producer/kafka-config-producer branch July 14, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agreement-events Kafka producer for agreement lifecycle events (Studio integration)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants