Handle Pulsar message acknowledgment, negative ack, and redelivery

domain: data-engineering · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Acknowledge successfully processed messages individually with consumer.acknowledge(msg) or in batch with consumer.acknowledgeCumulative(msg) (cumulative only for Exclusive/Failover subscriptions).
  2. On processing failure, call consumer.negativeAcknowledge(msg) to signal Pulsar to redeliver the message after a configurable redelivery delay.
  3. Configure the negative-ack redelivery delay via ConsumerBuilder.negativeAckRedeliveryDelay(duration) to avoid tight redelivery loops.
  4. Set an ack timeout with ConsumerBuilder.ackTimeout(duration, timeUnit) to automatically request redelivery of unacknowledged messages after the timeout expires.
  5. For persistent failures, configure a Dead Letter Topic (DLT) via ConsumerBuilder.deadLetterPolicy so messages exceeding the max redelivery count are moved to the DLT automatically.

Known gotchas

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans