prolic / HumusAmqpModule

AMQP module for Zend Framework 2 to integrate RabbitMQ
https://humusamqp.readthedocs.io
MIT License
31 stars 13 forks source link

Give the opportunity to use another client to communicate with RabbitMQ #28

Closed neeckeloo closed 8 years ago

neeckeloo commented 9 years ago

You could use an adapter pattern for instance to give the opportunity to use another client to communicate with RabbitMQ. Some people can not or don't want use the PHP AMQP extension. In my case, we use videlalvaro/php-amqplib package for that.

https://github.com/videlalvaro/php-amqplib

prolic commented 9 years ago

The HumusAMQPModule was based on php-amqplib in the beginning. But I had to remove the support for it completely, as it is not able to set a higher prefetch count with phpamqp-lib (at least at the moment). Also the ext-amqp extension has a much better performance even without setting higher prefetch counts. I know couple of big companies who are running their stack with ext-amqp, some even with this module. Supporting the php-amqplib via adapters doesn't make a lot of sense to me, when important features are missing at the moment.

thomasvargiu commented 9 years ago

I agree to support other clients via adapters. @prolic ignoring the performance, what isn't possible to do with php-amqplib?

neeckeloo commented 9 years ago

I agree that the extension is probably more efficient and that many companies use the extension. But there also are many others that can not use an extension for many reasons. I do not know the features that may be lacking but phpamqp-lib seems to be able to set a higher prefetch count with phpamqp-lib. https://github.com/videlalvaro/php-amqplib/blob/master/PhpAmqpLib/Channel/AMQPChannel.php#L1183 Currently, the module is tightly coupled with the extension. If it is not possible to reduce this coupling, I'll have to do another module dedicated to phpamqp-lib with similar features.

prolic commented 9 years ago

I am very busy these days. Give me some time, I'll come back to it shortly.

neeckeloo commented 9 years ago

Take a look at this: https://github.com/swarrot/swarrot

prolic commented 8 years ago

This is resolved with the new package https://github.com/prolic/HumusAmqp. The module package will be update, as soon as the new lib is ready.