1

RabbitMQ supports multiple protocols, AMQP, MQTT, STOMP, ....

When using PHP for example, it's easier to publish using the STOMP library since the PHP AMQP libraries requires compiled C code and is somewhat of a mission to setup if you don't have to.

On the JAVA side, apache camel with AMQP on spring is pretty straight forward.

Is it possible to setup a queue, publish to it via STOMP and then consume via AMQP and then again publish via AMQP and consume via STOMP if the message broker is RabbitMQ?

4

1 回答 1

1

是的,这应该可以工作,因为您已经在 RabbitMQ 节点上安装了RabbitMQ 的 STOMP 插件。

该协议只定义了客户端和服务器之间的通信,对消息本身没有影响。

您应该注意,使用 AMQP 以外的协议很可能会带来限制和/或更差的性能。

RabbitMQ还存在不需要编译 C 代码的原生 PHP 库。不幸的是,我不能告诉你哪个是最好的,因为我是一个 Java 人 ;-)。

于 2013-07-26T22:48:11.047 回答