shaneharter / PHP-Daemon

Build production-ready Daemons using PHP 5.3+. Build fault-tolerant applications without the boilerplate.
Other
768 stars 166 forks source link

Daemon working with rabbitMQ dropping calls #60

Open nadavgut opened 9 years ago

nadavgut commented 9 years ago

Hi I'm having problem of getting error: "Dropped Call. Requeuing Call # To {$call->method}" And "Dropped Call. Requeue threshold reached.

I can't figure out what is the root cause for that behavior happening more over this is happening occasionally in non consistent way.

The function which triggers this is "public function garbage_collector()". I tried to do restart when it is happening, but to put the problematic call back to daemon queue by the already written line code: $this->call($call) (and) $this->daemon->restart(); (my additional line code)

Questions is, if after daemon restart we already have the same daemon queue state as before or it is probably being initialized?

If we don't maintain daemon's queue state between daemon restart how can I return the call to rabbitMQ that will temporary store the call until daemon will be available again to handle the call.

This should happen somehow from this scope of code (Mediator.php)