ActiveMQ/Stomp debug when a message disables a consumer
I am scratching my head trying to debug a PHP transaction that seems to error out one of my consumers. I can detect if my consumer is running by GREPping the process list, before I insert a new message, but no way of knowing what was in there before and what caused the fatal error.
My PHP consumer is roughly:
while($isRunning == true) {
try{
if($frame = $this->stomp->readFrame()) {
$body = $frame->body;
$this->stomp->ack($frame);
}
} catch(StompException $e) {
$msg = 'Stomp Monitor readFrame() Callback Fail: '.$e->getMess开发者_如何学Cage();
error_log($msg);
}
}
Is there any way to catch fatal errors or anything that will break it out of the infinite loop?
Thanks, Steve
Try setting a top level exception handler
Perhaps there is an exception that your not catching. Catch it and log it so you know why the process dies.
精彩评论