Commit 8c77699
committed
[Messenger] widen retry catch to \AMQPException, rename helper
Production logs show bare \AMQPException (not \AMQPConnectionException)
thrown from ext-amqp C code during declareExchange() on fresh
connections. The C extension doesn't always promote SSL errors to
AMQPConnectionException — unmapped library_error codes fall to the
default branch in php_amqp_zend_throw_exception().
Widen the catch from \AMQPConnectionException to \AMQPException so the
retry wrapper catches all ext-amqp failures during publish. Rename the
helper from withConnectionExceptionRetry to withAmqpExceptionRetry to
match the new behavior.
Safe: clear() drops all cached state between retries, and max 3 retries
bounds the cost. Worst case is 3 extra reconnection attempts.1 parent fcd7a4a commit 8c77699
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | | - | |
| 459 | + | |
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
| 467 | + | |
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| |||
0 commit comments