This is a demo catalog. Create one for your own architecture with a single prompt.

Get started →

Customer events lag

What to do when customer registrations and profile changes stop showing up downstream.

Sev 2

Symptoms

Likely causes

  1. Customer APIServicev1.0.0Customer APIThe public-facing API for customer profiles. Handles commands to register and update customers, serves customer reads, a...Publishescustomer-registered, customer-updatedSubscribesregister-customer, update-customer +1APIsOpenAPIOwnercustomer-platformDiagramRepositoryOpen docs is writing to Customer DatabaseContainerv1.0.0Customer DatabasePostgreSQL database that is the system of record for all customer profile data.Ownercustomer-platformDiagramOpen docs but its event publisher is failing or retrying. Check the publish error rate first.
  2. The broker is rejecting writes or a partition is under-replicated. Check broker health before touching the service.
  3. A consumer has fallen behind and is reporting lag that is actually theirs, not ours.

Steps

  1. Confirm the lag is on our side. Compare customer_event_publish_lag_seconds (publisher) with the consumer group lag of the team reporting the problem. If the publish lag is flat and theirs is growing, the fix is on their side — point them at guides/integrating-with-customers.
  2. If the publisher is failing: look at Customer APIServicev1.0.0Customer APIThe public-facing API for customer profiles. Handles commands to register and update customers, serves customer reads, a...Publishescustomer-registered, customer-updatedSubscribesregister-customer, update-customer +1APIsOpenAPIOwnercustomer-platformDiagramRepositoryOpen docs logs for the failing message. A poison message is usually a profile with a value the schema does not allow. Move it to the dead-letter topic with the customer-dlq tool and let the publisher continue. Raise a ticket to fix the validation gap in Update CustomerCommandv1.0.0Update CustomerCommand to update an existing customer's profile. Ownercustomer-platformSchemaDiagramOpen docs.
  3. If the broker is unhealthy: page the messaging platform on-call. Do not delete or recreate topics; both customer events are replayed from the database and a lost topic means a full republish.
  4. If it is a database issue: publish lag often shows up alongside connection pool exhaustion. Scale Customer APIServicev1.0.0Customer APIThe public-facing API for customer profiles. Handles commands to register and update customers, serves customer reads, a...Publishescustomer-registered, customer-updatedSubscribesregister-customer, update-customer +1APIsOpenAPIOwnercustomer-platformDiagramRepositoryOpen docs down to relieve the pool rather than up.
  5. Watch customer_event_publish_lag_seconds recover. If it does not fall below 10s within 10 minutes, escalate.

Replaying events

If events were lost rather than delayed, Customer APIServicev1.0.0Customer APIThe public-facing API for customer profiles. Handles commands to register and update customers, serves customer reads, a...Publishescustomer-registered, customer-updatedSubscribesregister-customer, update-customer +1APIsOpenAPIOwnercustomer-platformDiagramRepositoryOpen docs can republish Customer RegisteredEventv1.0.0Customer RegisteredPublished when a new customer has registered. Ownercustomer-platformSchemaDiagramOpen docs and Customer UpdatedEventv1.0.0Customer UpdatedPublished when an existing customer's profile has changed. Ownercustomer-platformSchemaDiagramOpen docs for a time window from the database. Republished events keep their original eventId, so idempotent consumers are unaffected. Announce the replay in #customer-support first — consumers who are not idempotent will see duplicates.