[rabbitmq-discuss] PHP AMQP library

Ben Hood 0x6e6562 at gmail.com
Sat Dec 6 23:16:23 GMT 2008


On Fri, Dec 5, 2008 at 8:47 PM, Vadim Zaliva <lord at crocodile.org> wrote:
> I have put together simple PHP AMQP library which I am using to
> access RabbitMQ.

People have asked for a PHP client in the past so it's great to see
the community mobilize itself :-)

> This is a "naive" port of py-ampqlib code,
> pretty much line by line.

Looks pretty concise on face value :-)

> The code is pretty fresh. I have been able to publish some messages
> with it, but it needs more debugging. I am not a PHP expert,
> and I am hoping for help from the open source community with testing,
> debugging
> and further improvements of this code.

Without wanting to get too pedantic, just porting py-amqplib line for
line may have consequences for your library.

For starters, I don't know how you wrote the codec handling - in
general this is generated from the spec (see
extras/generate_skeleton_0_8.py in Barry's tree). If you've got an
automatic way to rebase PHP from the python code, that's cool, but if
not, please be aware that the spec does change periodically (e.g. the
0.9.1 spec is going to be implemented soon).

Secondly, you may want to consider how you want to handle parallelism.
The initial version of py-amqplib took a single threaded approach,
which was cool, but in some circumstances you could run into
difficulties - but I'm sure that Barry can advise.

Thirdly, I don't know whether you've read this article:

Lastly, you might also gain some insights by looking at Aman's Ruby
library: http://github.com/tmm1/amqp/tree/master and asking questions
on the ruby amqp list.



More information about the rabbitmq-discuss mailing list