#4311·hatchet

[BUG] hatchet-engine panics on RabbitMQ x-death count (int32 vs int64)

Author: retemaadiCreated Jun 30, 2026Updated Sep 29, 2026
Labelsstale

Describe the issue

hatchet-engine panics when consuming dead-lettered RabbitMQ messages that include an x-death header. RabbitMQ encodes the count field as a signed 32-bit integer per AMQP 0-9-1, but the consumer asserts int64:

go
deathCount := xDeath[0].(amqp.Table)["count"].(int64)

This panics with:

panic: interface conversion: interface {} is int32, not int64
  at internal/msgqueue/rabbitmq/rabbitmq.go:805

Because the engine auto-subscribes to *_dlq_proc queues, a single dead-lettered message can crash-loop the engine and block all gRPC traffic.

Environment

  • Engine: Self-hosted v0.89.7 (also present on main / v0.90.13)

Expected behavior

The engine should read the x-death retry count without panicking, regardless of whether RabbitMQ delivers count as int32 or int64.

Code to Reproduce, Logs, or Screenshots

  1. Reject a message on a Hatchet queue so it is dead-lettered to *_dlq_proc
  2. Engine consumes the message from the DLQ processing queue
  3. Observe panic at rabbitmq.go:805

Additional context

Proposed fix in #4310


AI Disclosure
  • I acknowledge that an LLM was used in the creation of this Issue, in accordance with Hatchet's AI_POLICY.md.
  • Details: Cursor assisted with diagnosis from production logs and drafting this issue; content was reviewed before submission.