-
Notifications
You must be signed in to change notification settings - Fork 436
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
WIP: Add support for using a pre-configured client with the SQS driver #444
WIP: Add support for using a pre-configured client with the SQS driver #444
Conversation
@@ -38,7 +39,9 @@ class SqsConnectionFactory implements PsrConnectionFactory | |||
*/ | |||
public function __construct($config = 'sqs:') |
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.
I think the constructor should accept an instance of Client, no need to pass it as an array parameter. We would not be able to apply other options in the array in any case.
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.
The symfony transport should have it as a client option though
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.
Done.
@makasim Any suggestions on what I might be doing wrong with the bundle configuration change? |
@elazar I've not spotted anything suspicion, gonna take a closer look later. |
@makasim Bump. 😉 |
@@ -34,6 +34,7 @@ public function addConfiguration(ArrayNodeDefinition $builder) | |||
{ | |||
$builder | |||
->children() | |||
->scalarNode('client')->defaultNull()->end() |
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.
I would expect there to be something like the following in createConnectionFactory()
below:
if (false == empty($config['client'])) {
$config['client'] = new Reference($config['client']);
}
Use client defined in configuration in SqsConnectionFactory
…ient WIP: Add support for using a pre-configured client with the SQS driver
This is a work-in-progress and relates to #443.
Many thanks to @rpkamp and @dbrumann for their assistance!