Back to all use cases
Apache KafkaLogistics

The topic is fine. The consumers are not.

A logistics firm's order-tracking consumers fall hours behind during peak volume on a self-managed Kafka cluster, while the topics and brokers look healthy. OSSeva Assure works the incident around the clock, and Operate alerts on consumer lag before customers notice.

Challenge

Consumer lag is the gap between the newest message in a partition and the offset a consumer group has committed. When it grows, the brokers are usually fine, so the platform team and the application team each point at the other and nobody owns the incident.

The repeated causes sit on the consumer side. The consumer is slow because processing time per message is longer than the rate messages arrive. The group is under-partitioned, so there are not enough consumer threads for the load. Or the group is failing and rebalancing. The last one is the hardest to see. If max.poll.interval.ms is shorter than the real worst-case time to process a batch, one slow downstream call gets a consumer evicted from the group. That triggers a rebalance, the rebalance delays every other member, and more consumers get evicted. A rebalance storm sustains itself once it starts, and the evidence is in the consumer logs, not on the broker.

The obvious fix does not always work. Adding partitions helps when lag is spread evenly and processing is the bottleneck, but adding partitions to an existing topic triggers a rebalance of its own, and it does nothing for a group that is evicting its own members. Client defaults have also moved over time. From Kafka 3.0 the consumer session.timeout.ms default rose from 10 to 45 seconds, so a consumer tuned on an older client does not behave the way its configuration suggests.

Environment

A self-managed Apache Kafka cluster on virtual machines or Kubernetes, in a logistics operation where order-tracking, routing and notification services each run as a consumer group. Volume is uneven: peaks arrive with shipping surges, and the services that consume the topics are owned by different teams.

The cluster may run any line OSSeva covers, from 2.8 to 4.x. Kafka Streams applications and Kafka Connect workers, where used, sit in the same picture, because they are consumers too.

Options

Tune the consumers in house. This works when one team owns the client code and can read per-partition lag and consumer logs during the incident. It depends on someone being awake at the peak and knowing which of the three causes they are looking at.

Add partitions and consumers. This helps when processing is the bottleneck and lag is even across partitions. It does not stop a rebalance storm, and the partition change itself causes a rebalance.

Move to a provider-hosted Kafka service. The provider runs the brokers, but the consumer group settings and the downstream calls that stall consumers stay in your application, so the cause of the lag moves with you.

Bring in OSSeva. Assure gives you 24/7 reactive support from an engineer who reads lag by partition and the consumer logs and tells you which cause it is. Operate adds the monitoring that catches it earlier. OSSeva works on the clusters you already run, and does not host them.

Approach

OSSeva Assure includes 24/7 reactive support. When lag climbs, an engineer works the incident from per-partition lag and consumer group state, separates a slow consumer from a skewed or under-partitioned topic and from a rebalance storm, and recommends the change: a longer max.poll.interval.ms, a smaller max.poll.records, more partitions with a planned rebalance, or a fix to the downstream call. Assure also includes a cluster configuration audit and a throughput and latency review, which look at the cluster side so the brokers can be ruled in or out.

OSSeva Operate adds 24/7 broker and consumer-lag monitoring, so lag alerts fire before customers see late order status. It also includes capacity planning and scaling operations, operational support for Kafka Streams and Connect, a 15-minute response to P1 incidents, and quarterly architecture reviews. OSSeva Operate runs on your own servers, cloud account or Kubernetes.

If the cluster is on a line the Apache project no longer fixes, OSSeva Patch ships patched builds for 2.8.x to 3.9.x under the same contract.

What this delivers

A lag incident gets a named cause and a specific change rather than a standing argument between teams, and lag is monitored around the clock, with capacity for the next peak planned from the monitoring data. OSSeva Kafka support is priced per cluster. Book a 15-minute discovery call for a quote.

Go deeper

Questions

Frequently asked questions

Book a 15-minute call

What causes Kafka consumer lag?

Three things account for most of it: consumers that process messages slower than they arrive, too few partitions for the number of consumers needed, and consumer groups that keep rebalancing. A rebalance storm often starts when max.poll.interval.ms is shorter than the worst-case time to process a batch.

Does adding partitions fix consumer lag?

Only when lag is spread evenly and processing is the bottleneck. Adding partitions to an existing topic causes a rebalance, and it does not help a group that keeps evicting its own members.

Can OSSeva work a lag incident on a cluster it does not host?

Yes. OSSeva works on clusters you run on your own servers, cloud account or Kubernetes. Assure includes 24/7 reactive support, and Operate adds a 15-minute response to P1 incidents.

Does OSSeva Operate monitor consumer lag?

Yes. Operate includes 24/7 broker and consumer-lag monitoring, plus capacity planning and scaling operations, priced per cluster.

See every EOL & CVE-patching use case

All use cases
Book a call