williamespindola / rabbitmq-service-provider

RabbitMQ Silex service provider

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support all options of AMQPStreamConnection

mirfilip opened this issue · comments

RabbitServiceProvider acts as a wrapper/factory that is responsible for preparing either AMQPStreamConnection or AMQPLazyConnection.

Currently, only: host, port, user, password, vhost are passed to the constructor. If you define any other config keys that are supported by php-amqplib, they'll just be ignored.

This is especially painful if you want to customize timeouts, heartbeat or keepalive. These are construction-time variables and cannot be changed after connection object creation.

Also, the only required arguments for constructing AMQPStreamConnection are: host, port, user, password. vhost is / by default. Yet, you need to define it in config or you get array access errors. Yes, a little nitpick ;)

This library should really pass all the options if it wants to be a good wrapper.

Hi @mirfilip so you can help to do this with some PRs and issues. Where can we start?