swarrot / SwarrotBundle

A symfony bundle for swarrot integration
MIT License
89 stars 59 forks source link

Multiple hosts support #213

Closed yun548 closed 3 years ago

yun548 commented 3 years ago

It seems that amqp_lib supports multiple hosts for a same connection, is this supported by the bundle configuration when using amqp_lib ? I can't seem to find an example with the reference ?

I'm imagining configuration would be something along these lines :

swarrot:
    provider: amqp_lib
    default_connection: rabbitmq
    default_command: swarrot.command.base
    connections:
        rabbitmq:
            url: "amqp://%rabbitmq_user%:%rabbitmq_password%@%rabbitmq_host1%&%rabbitmq_host2%:%rabbitmq_port%"
            vhost: '/'
stof commented 3 years ago

no. this is not supported (the bundle doesn't use the create_connection static method to create the connection)

yun548 commented 3 years ago

Thank you for the quick reply.