メッセージングシステムで、dequeue 後に正しく処理できずに異常終了したらどうなるのか? Twitter などで利用されている Kestrel には reliable read という仕組みがあり、一度 dequeue したアイテムの処理中にエラーが発生しても、キューの先頭に enqueue できる。 この動作を実際に確認してみた。 Reliable Read Command Memcached プロトコルで reliable read をするには、キューからアイテムを取得する際に / に続けて以下のオプションを指定する。 /open : 一時的に dequeue /close : dequeue を確定 /abort : dequeue を取り消し、queue の先頭に enqueue Reliable Read Examples 以下の4パターンについて、キューの処理と peek
![Kestrel:Reliable Read](https://cdn-ak-scissors.b.st-hatena.com/image/square/ffcab9c1093f883552e33b460d9837af7ff26567/height=288;version=1;width=512/https%3A%2F%2Fsiguniang.files.wordpress.com%2F2012%2F05%2Fkestrel.png)