Shopware Messenger: Uncertain behavior of message cancellations on worker shutdown
0 reputation · 29 Apr 2026, 15:35 UTC
Shopware Messenger: Uncertain behavior of message cancellations on worker shutdown
When a Shopware worker exceeds its configured process timeout, the framework does not issue a cancellation signal to any ongoing database transaction. The message simply remains unacknowledged and is scheduled for a retry according to the configured redelivery limit. After the limit is reached, the message is moved to the failure transport, but the original task may have partially completed, potentially causing duplicate work.
Because the default redelivery limit is three attempts, a long‑running job can be retried multiple times before being considered failed, yet the application logic may not be idempotent. This raises uncertainty about how graceful cancellation should be achieved and how to tune the retry strategy without risking message loss or excessive duplication.
What are the precise conditions under which a message is transferred to the failure queue after a worker timeout? Does Shopware provide any hooks or configuration to signal cancellation to long‑running processes? How can the redelivery limit be adjusted to balance reliability and idempotency in production environments?