-
Notifications
You must be signed in to change notification settings - Fork 129
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
Add queue interop driver #320
Conversation
Thanks for the PR @makasim! @sagikazarmark should we still merge this or have new drivers directly in a separate repo like we are going to do in #256? Or still add it here and move the packages out all in one time? |
Is it going to be merged? I need kind of approval to push it forward (add tests and doc.) |
src/Driver/InteropDriver.php
Outdated
|
||
return $this->consumers[$queueName]; | ||
} | ||
} |
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.
Missing newline
src/Driver/InteropDriver.php
Outdated
use Interop\Queue\PsrConsumer; | ||
use Interop\Queue\PsrContext; | ||
|
||
class InteropDriver implements Driver |
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.
Should be final.
I would be more comfortable with a separate repo. @henrikbjorn can you please grant @acrobat and me access to creating new repos. I would like to start separating drivers in a few weeks. |
Could you please create a repo for me too so I can move stuff there as well. |
If someone's going to be separating out drivers can you have a look at https://github.com/bernardphp/OpenCloud? I did a pr for an opencloud driver ages ago- happy to pick it up again if there's any feedback. |
I have granted the permissions.
man. 24. jul. 2017 kl. 20.50 skrev kynx <[email protected]>:
… If someone's going to be separating out drivers can you have a look at
https://github.com/bernardphp/OpenCloud? I did a pr for an opencloud
driver ages ago- happy to pick it up again if there's any feedback.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#320 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABNDSmAlkSg1AkxFvtuf3Oy6qaVbNfRks5sROdkgaJpZM4OcWe0>
.
|
@kynx ill merge the opencloud one and feel free to pick it up again to match the new master, |
Yes @kynx we will merge that pr! We will start soon with moving the drivers to separate repo's and then we will also pick up your and this PR! |
@henrikbjorn Thanks! |
@henrikbjorn can you also please add me to a package on packagist as well?
|
What is your Packagist username? |
mark.sagikazar |
Done |
Thanks @henrikbjorn! |
Thanks |
Added AmqpInteropDriver which extends the functionality of InteropDriver with AMQP specific features. It could be used with php-amqplib, amqp-ext and bunny libs. |
@sagikazarmark regarding separate repository. Isn't the code still merged to this repository and later it is split to the separate repository. If so, I don't see a reason why should we wait till it happens. |
Added tests and docs. Ready for review. |
I am okay with merging code here (with a bit of squashing looking at the history), but I would like to avoid more releases before the driver refactor. |
@sagikazarmark rebased&squashed |
@sagikazarmark could you please take a look at this? |
I've took some time off and a bit of vacation in the last weeks, but I will make some time to review pr's in the coming days! |
@acrobat great! just let me know if there is anything that should be done. |
TBH I am not 100% sure why there is a separate driver for AMQP. That's the first thing that popped up after a quick review. Can't see any explanation in the docs either. Other than that it's quite a PR, so I need some more time to review it. |
@sagikazarmark amqp interop is an exnteded version of queue interop and it defines AMQP specific things such as create\remove a queue, ability to get message count and so on. Obviously that any amqp interop compatible transport could be used with The amqp interop currently supports three major amqp clients available in PHP: php-amqplib, amqp-ext and bunny and any of them will work with |
Worth to mention that I am going to provide support for these interop drivers. |
Thanks for the explanation, I thought something similar. Just for me to understand: the AmqpInterop driver contains some extra logic for AMQP implementations which are not supported by the plain Interop driver, but any AMQP implementation should work with the normal Interop driver as well. Is that correct? I wonder if it would make sense to extend the interop driver instead of passing it to the AmqpInterop driver. From the above explanation it seems it does. |
@sagikazarmark you are absolutely right
we can have one single driver and some |
Well, if we can say that it's unlikely that over time we have to fill the Interop driver with tons of ifs to support all kinds of interop variants then that could work for me as well. Would make things simpler for sure. |
I don't expect anything to be added over time. |
@sagikazarmark merged everything in InteropDriver. |
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 had one comment, apart from that looks good to me.
src/Driver/InteropDriver.php
Outdated
/** | ||
* @return PsrContext | ||
*/ | ||
public function getContext() |
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.
Drivers are an internal thing to Bernard. Is there any reason to expose the context?
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 see. The method has been removed.
@sagikazarmark @acrobat a kind remainder. Sorry If I am insistent on this one, I don't want to put this into the pending tray |
No problem, keep pushing it. I will give it a last shot today. |
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.
Looks good to me!
Thanks @makasim |
Thank you too. Would you like to join queue interop group? I would really happy to see you there. |
👍 thanks @makasim! |
The driver can work with any queue interop compatible transport such as:
It also provide an extended driver version for amqp interop compatible transports. It supports some amqp specific features such as queue declaration and message couting.
TODO:
I welcome everyone who is interested in MQs to join the queue interop group