Kdyby / RabbitMq

Integration of php-amqplib with RabbitMq and Nette Framework
https://packagist.org/packages/kdyby/rabbitmq
MIT License
28 stars 48 forks source link

MultipleConsumer ignores messages count limit #40

Open skrivy opened 8 years ago

skrivy commented 8 years ago

Having following configuration:

rabbitmq:
    consumers:
        singlejob:
            queue: { name: 'singlejob', passive: true }
            callback: [ @App\Consumer\SingleJobConsumer, process ]
        multipleJob:
            queues:
                multiplejob.low:
                    passive: true
                    callback: [ @App\Consumer\MultipleJobConsumer, process ]
                multiplejob.high:
                    passive: true
                    callback: [ @App\Consumer\MultipleJobConsumer, process ]

Everything works for single job - it dies after 1 message is processed:

php index.php rabbitmq:consumer -m 1 singleJob

When testing multiplejobs - the process never dies and still consumes incoming messages:

php index.php rabbitmq:consumer -m 1 multipleJob