Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when connecting to the rabbitmq queue #97

Open
realization opened this issue Nov 9, 2023 · 4 comments
Open

Error when connecting to the rabbitmq queue #97

realization opened this issue Nov 9, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@realization
Copy link

Description

Error when connecting to the rabbitmq queue:

ERROR: Unable to declare consumer pipeline "my_amqp". Reason: Error 'rpc_declare_pipeline: 	jobs_plugin_declare: expected { character for map value' on tcp://127.0.0.1:6001 []

How To Reproduce

I created a CLI application with the "queue" & "road-runner" component.
I decided to connect the rabbitmq queue (to exchange.type=topic).

in the file app/config/queue.php
added the my_amqp array with queue settings to pipelines

...
        'my_amqp' => [  
            'connector' => new AMQPCreateInfo(  
                'main_queue',  
                exchange: 'app_events',  
                exchangeType: Spiral\RoadRunner\Jobs\Queue\AMQP\ExchangeType::Topics,  
                exchangeDurable: true,  
                queue: 'test-service',  
                durable: true,  
                requeueOnFail: true,  
                routingKey: 'event.*',  
            ),  
            'consume' => true  
        ],  

added rr-amqp to connections.
example: code.tar.gz

Launched ./rr serve
I see in the logs

[2023-11-09T16:56:27.544092+00:00] ERROR: Unable to declare consumer pipeline "my_amqp". Reason: Error 'rpc_declare_pipeline: 	jobs_plugin_declare: expected { character for map value' on tcp://127.0.0.1:6001 []
[2023-11-09T16:56:27.544311+00:00] ERROR: Unable to declare consumer pipeline "memory". Reason: Error 'rpc_declare_pipeline: pipeline already exists, name: local, driver: memory' on tcp://127.0.0.1:6001 []
[2023-11-09T16:56:27.555059+00:00] ERROR: Unable to declare consumer pipeline "my_amqp". Reason: Error 'rpc_declare_pipeline: 	jobs_plugin_declare: expected { character for map value' on tcp://127.0.0.1:6001 []

logs.tar.gz

Additional Info

Q A
Framework Version 3.9.1
PHP version 8.1.14
Operating system Debian GNU/Linux 11 (bullseye)
@realization realization added the bug Something isn't working label Nov 9, 2023
@butschster butschster self-assigned this Nov 9, 2023
@butschster
Copy link
Member

Hello! Could you show your .rr.yaml config ?

@realization
Copy link
Author

Hello! Could you show your .rr.yaml config ?

version: '3'
rpc:
    listen: 'tcp://127.0.0.1:6001'
amqp:
  addr: amqp://admin:***@127.0.0.1:5672
jobs:
    pool:
        num_workers: 2
        max_worker_memory: 100
    consume: {  }
server:
    command: 'php app.php'
    relay: pipes

@butschster
Copy link
Member

Could you provide RR version? Maybe do you have some var_dump executions in your code?

@realization
Copy link
Author

Could you provide RR version? Maybe do you have some var_dump executions in your code?

[INFO] RoadRunner server started; version: 2023.3.3, buildtime: 2023-10-26T18:43:18+0000

I did not add "var_dump" to the project, I added edits only to the files: .rr.yaml, queue.php, .env

@butschster butschster transferred this issue from spiral/framework Jan 2, 2024
realization pushed a commit to realization/jobs that referenced this issue Apr 13, 2024
realization pushed a commit to realization/jobs that referenced this issue Apr 13, 2024
realization pushed a commit to realization/jobs that referenced this issue Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants