diff options
author | Brion Vibber <brion@pobox.com> | 2010-01-22 12:35:05 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-01-22 12:52:56 -0800 |
commit | 6e4cad71e546505b4bb4a168c1b11b84a45b7889 (patch) | |
tree | 933939d1750c1085ae19ac729fc85837f21c7816 /lib/unqueuemanager.php | |
parent | c7507e7e9dafa6d6e054978e720e4fce3abc9929 (diff) |
Fix for stuck queue messages: wrap processing in stomp transactions so our lack of an ACK if PHP dies actually triggers redelivery.
Previously, messages once delivered would just get stuck in the queue seemingly forever if they never got ACKed.
Note this could lead to partial duplication, for instance if the OMB or Twitter queue handlers die after 1/2 of the outgoing sends.
Recommendations:
* catch exceptions more aggressively within queue handlers (so only PHP fatal errors are likely to kill in the middle)
* for processing that involves sending to multiple clients, consider a second queue similar to the XMPP output, eg for OMB:
- first queue gets delivery list and builds message data, enqueueing it for each target address
- second queue can handle each individual outgoing message (and attempt redelivery etc separately)
This would also protect better against a recurring error preventing delivery in the second part, and could spread out any slow sends over multiple threads.
Diffstat (limited to 'lib/unqueuemanager.php')
0 files changed, 0 insertions, 0 deletions