@@ -40,6 +40,7 @@ class Connection
4040 'poll_timeout ' => 0.1 ,
4141 'visibility_timeout ' => null ,
4242 'delete_on_rejection ' => true ,
43+ 'retry_delay ' => 0 ,
4344 'auto_setup ' => true ,
4445 'access_key ' => null ,
4546 'secret_key ' => null ,
@@ -103,6 +104,7 @@ public function __destruct()
103104 * * poll_timeout: amount of seconds the transport should wait for new message
104105 * * visibility_timeout: amount of seconds the message won't be visible
105106 * * delete_on_rejection: Whether to delete message on rejection or allow SQS to handle retries. (Default: true).
107+ * * retry_delay: amount of seconds the message won't be visible before retry. (Default: 0).
106108 * * sslmode: Can be "disable" to use http for a custom endpoint
107109 * * auto_setup: Whether the queue should be created automatically during send / get (Default: true)
108110 * * debug: Log all HTTP requests and responses as LoggerInterface::DEBUG (Default: false)
@@ -137,6 +139,7 @@ public static function fromDsn(#[\SensitiveParameter] string $dsn, array $option
137139 'poll_timeout ' => $ options ['poll_timeout ' ],
138140 'visibility_timeout ' => null !== $ options ['visibility_timeout ' ] ? (int ) $ options ['visibility_timeout ' ] : null ,
139141 'delete_on_rejection ' => filter_var ($ options ['delete_on_rejection ' ], \FILTER_VALIDATE_BOOL ),
142+ 'retry_delay ' => (int ) $ options ['retry_delay ' ],
140143 'auto_setup ' => filter_var ($ options ['auto_setup ' ], \FILTER_VALIDATE_BOOL ),
141144 'queue_name ' => (string ) $ options ['queue_name ' ],
142145 'queue_attributes ' => $ options ['queue_attributes ' ],
@@ -323,7 +326,7 @@ public function reject(string $id): void
323326 $ this ->client ->changeMessageVisibility ([
324327 'QueueUrl ' => $ this ->getQueueUrl (),
325328 'ReceiptHandle ' => $ id ,
326- 'VisibilityTimeout ' => $ this ->configuration ['visibility_timeout ' ] ?? 30 ,
329+ 'VisibilityTimeout ' => $ this ->configuration ['retry_delay ' ] ,
327330 ]);
328331 }
329332 }
0 commit comments