Synchronous AMQP from PHP
Can PHP treat AMQP like an RPC service, and send a message and block until a reply is returned? Are there any good examples of this, and do any libraries wrap such functionality up in an easy-to-use way?
I'd like to have the flexibility of a brokered messaging system, but shield the web tier from needing to know about its asynchronous nature.
Sure, absolutely. Look at how an RPC-style request flows around a system:
That's completely implementable with an asynchronous message system like AMQP. You just need to do the RPC correlation yourself:
RabbitMQ, an AMQP broker, offers documentation online on how to do exactly this.
链接地址: http://www.djcxy.com/p/61216.html上一篇: MassTransit与RabbitMQ:MT超时第二个请求/响应
下一篇: 来自PHP的同步AMQP