Current static consumer impl calls consume callback even when queue is empty. This behavior causes TypeError exception when consumer implements IConsumer interface.
TypeError: Argument 1 passed to App\Consumer::consume() must be an instance of Bunny\Message, null given in /var/www/project/app/Consumer.php:62
Stack trace:
#0 [internal function]: App\Consumer->consume(NULL)
#1 /var/www/project/vendor/gamee/nette-rabbitmq/src/Consumer/Consumer.php(99): call_user_func(Array, NULL)
#2 /var/www/project/vendor/gamee/nette-rabbitmq/src/Console/Command/StaticConsumerCommand.php(45): Gamee\RabbitMQ\Consumer\Consumer->consumeSpecifiedAmountOfMessages(1)
#3 /var/www/project/vendor/symfony/console/Command/Command.php(264): Gamee\RabbitMQ\Console\Command\StaticConsumerCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/project/vendor/symfony/console/Application.php(869): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/project/vendor/symfony/console/Application.php(223): Symfony\Component\Console\Application->doRunCommand(Object(Gamee\RabbitMQ\Console\Command\StaticConsumerCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/project/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/project/bin/console(5): Symfony\Component\Console\Application->run()
#8 {main}
Current static consumer impl calls consume callback even when queue is empty. This behavior causes TypeError exception when consumer implements IConsumer interface.