-
Notifications
You must be signed in to change notification settings - Fork 466
AMQPSocketConnection has a different parameters order, lets consider it #527
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
Conversation
What surprises me is also that most of the people here as solution for the Are there different ways to use |
3a5e688 allows to pass generic parameters to constructors allowing to use all other types of connection present in https://github.com/php-amqplib/php-amqplib/tree/master/PhpAmqpLib/Connection |
Any feedback on this? |
Would you mind adding one test for constructor_args and one for the |
sure! will do soon |
@@ -211,6 +269,28 @@ public function testSSLConnectionParameters() | |||
), $instance->constructParams); | |||
} | |||
|
|||
public function testConnectionsParametersProviderWithConstructorArgs() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this tests covers already constructor_args
. the clas name has to be OldSound\RabbitMqBundle\Tests\RabbitMq\Fixtures\AMQPConnection
, using any other connection will try to connect to rabbitmq
return $ref->newInstanceArgs($this->parameters['constructor_args']); | ||
} | ||
|
||
if ($this->class == 'PhpAmqpLib\Connection\AMQPSocketConnection' || is_subclass_of($this->class , 'PhpAmqpLib\Connection\AMQPSocketConnection')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not know really how to test this since will try to connect to rabbtmq
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I forgot it extends from AbstractConnection
Left two comments. is not really clear to me which other tests should be added. Can you provide more info? |
:) great, thanks |
AMQPSocketConnection
has a different parameter ordering thanAMQPStreamConnection
Currently the example on how to use sockets connection does not work.
You will always get
To solve is necessary to pass
read_timeout
= 0 or a higher value to theAMQPSocketConnection
class.I guess this can be "solved" by
connection_parameters_provider
, but since sockets looks to be supported natively by the bundle they should work almost out of the box.Ive spent days trying to setup socket connections.