docker - "Error reading data" while executing a RabbitMQ consumer in Symfony -


i have rabbitmq container , php 7 container symfony 3.1.x project executes rabbitmq consumer using oldsoundrabbitmqbundle.

when running command executes test consumer:

bin/console rabbitmq:consumer -w test 

i following error:

[phpamqplib\exception\amqpioexception]

error reading data. received 0 instead of expected 7 bytes

my setup simple , checked following things:

  • rabbitmq @ latest version (3.6.5)
  • the configured host, vhost, user, password parameters correct
  • mbstring extension enabled

it's easy set project reproduce issue.

the sample project available on github , instructions provided in readme file reproduce issue few steps.

here highlights:

docker-compose.yml

version: '2' services:   php:     build: ./docker/php/     links:       - rabbitmq     volumes:       - ./src:/var/www/rabbitmq-test     working_dir: /var/www/rabbitmq-test    rabbitmq:     image: rabbitmq:3.6-management 

config.yml

old_sound_rabbit_mq:     connections:         default:             host:     'rabbitmq'             port:     5672             user:     'guest'             password: 'guest'             vhost:    '/'             lazy:     false             # ...     producers:         # ...     consumers:         test:             connection:       default             exchange_options: {name: 'test', type: direct}             queue_options:    {name: 'test'}             callback:         test_consumer 

the test_consumer service simple class implementing consumerinterface interface.

would have idea concerning problem?

the answer straightforward. had change in config.yml:

old_sound_rabbit_mq:     connections:         default:             # ...              use_socket: true 

to:

old_sound_rabbit_mq:     connections:         default:             # ...              use_socket: false 

note false default value.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -