Comunication beetwen MQTT and AMQP on RabbitMQ

Im having problems with mqtt and amqp comunication

The point is:

I have a RabbitMQ instance with the MQTT plugin, i have a mqtt producer/consumer and an AMQP producer/consumer too (using php-amqplib on the symfony RabbitMqBundle)

The RabbitMQ documentation says that all MQTT topics works on the amq.topic exchange.

Right

My situation:

MQTT consumer/producer subscribed on /topic/test topic AMQP consumer on amq.topic exchange, on route key .topic.test (i dont know about this but rabbit replace / for . on mqtt topics)

AMQP consume MQTT messages: OK AMQP produce message to MQTT: NOT MQTT to MQTT: OK AMQP to AMQP: OK

My mqtt pub/sub is a JS client (tested in some) My AMQP pub/sub ith the php/symfony

OBS:

if i go to the RabbitMQ, in the amq.topic exchange, .topic.test queue and send a message, the mqtt client receive right

The problem is with the php client

old_sound_rabbit_mq:
    connections:
        default:
            host:     '%queue_host%'
            port:     '%queue_port%'
            user:     '%queue_user%'
            password: '%queue_password%'
            vhost:    '/'
            lazy:     false
            connection_timeout: 30
            read_write_timeout: 30
            keepalive: false
            heartbeat: 0
            #use_socket: true
    producers:
        search_driver:
            connection:       default
            exchange_options: {name: 'amq.topic', type: topic}
            queue_options:    {routing_keys: ['.topic.test']}
    consumers:
        search_driver:
            connection:       default
            exchange_options: {name: 'amq.topic', type: topic}
            queue_options:    {routing_keys: ['.topic.test']}
            callback:         my.consumer.service

Seems this does not happen in other languages and libraries: http://blog.airasoul.io/the-internet-of-things-with-rabbitmq-node-js-mqtt-and-amqp/

链接地址: http://www.djcxy.com/p/34176.html

上一篇: 使用AMQP和STOMP连接到相同的交换机

下一篇: 在RabbitMQ上通信MQTT和AMQP