bschmitt / laravel-amqp

AMQP wrapper for Laravel and Lumen to publish and consume messages
MIT License
268 stars 86 forks source link

In cli mode, execute Amqp:: consume, and receive messages for a period of time. #39

Closed JayenLee closed 5 years ago

JayenLee commented 6 years ago
Consume messages forever
Amqp::consume('queue-name', function ($message, $resolver) {

   var_dump($message->body);

   $resolver->acknowledge($message);

});

This method can't receive MQ server's push any more than a few minutes without receiving the message. What's the problem, please?

stevenklar commented 6 years ago

@JayenLee Did you try to change the timeout? Does it effect the mentioned behaviour in any way?