You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v5.9.3: Defer job publication until application transaction commits
When a job is published within an active application database transaction, it must not be sent to the message broker immediately. Sending it too early could lead to a race condition where another consumer picks up the job before the data it relies on is committed to the database, causing the consumer to fail.
This change introduces a dedicated `appConnection` to `BackgroundQueue`, which represents the application's database connection. Publication is now conditionally deferred based on the transaction status of this `appConnection` (expected to be managed by `BackgroundQueueMiddleware`), ensuring data consistency by publishing only after the application transaction successfully commits.