SpinGo / op-rabbit

The Opinionated RabbitMQ Library for Scala and Akka
Other
232 stars 73 forks source link

Rabbitmq connection setup expose channel rpc timeout #192

Open livius-ungureanu opened 4 years ago

livius-ungureanu commented 4 years ago

Problem:

The AMQP drivers executes an AMQP command within a certain amount of time (i.e. ConnectionFactory.DEFAULT_CHANNEL_RPC_TIMEOUT). Op-rabbit should allow the op-rabbit user to set this timeout according to his needs. In order to achieve this com.spingo.op_rabbit.ConnectionParams should expose it in the last parameter of the constructor:

channelRpcTimeout: Int = ConnectionFactory.DEFAULT_CHANNEL_RPC_TIMEOUT

This also ensures backward compatibility.

@timcharper this is branched off rabbitmq-connection-setup-callback which is waiting for merge approval into master.