What is a good message broker that works with PHP?

↘锁芯ラ 提交于 2019-12-23 04:47:19

问题


I am looking for a message broker (like Apache ActiveMQ for Java) that works with PHP, preferably open-source. Any ideas?


回答1:


You can use Stomp (http://stomp.codehaus.org), it has a client for PHP that you can use to communicate with any of the brokers (includes ActiveMQ, http://stomp.codehaus.org/Brokers).

There's also Memcacheq (http://memcachedb.org/memcacheq/), there's an example about how to use it on that page.

You could also use Apache ActiveMQ and use a library like Zend_Queue (part of the Zend Framework, http://framework.zend.com/manual/en/zend.queue.html). It also supports a few other queue systems.




回答2:


I've had great luck with ActiveMQ. We were connecting Java to .NET, both sides had no problem. As scriptha mentions, any environment that can speak STOMP can speak to ActiveMQ.

http://stomp.codehaus.org/PHP links to a STOMP PHP client.

We ran thousands of messages per hour on ActiveMQ, and had the timing down to under 200ms including application time. It's fast, flexible, extensible and connects to lots of different environments. Definitely worth looking in to.




回答3:


Besides what's written above you can also try Beanstalkd if you want a very simple message queue with clients in many languages.




回答4:


what about http://www.rabbitmq.com, it works with any language you want, for example how to use it in this tutorial

http://www.rabbitmq.com/tutorials/tutorial-one-php.html

Python | Java | Ruby | PHP | C#



来源:https://stackoverflow.com/questions/1655306/what-is-a-good-message-broker-that-works-with-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!