Problem to send a message to AMQP in zato 2.0.7

I’m using this code to send a simple message to RabbitMQ, but the message is not sent and the logs do not show nothing.

test_amqp_send_using_lib_zato.py

Zato

from zato.common import DATA_FORMAT
from zato.server.service import Service

class Processa(Service):

def handle(self):  
    mensagem = {"count": 0}
    self.outgoing.amqp.send(dumps(mensagem), 'ramais', '/ramais', 'ramais') 

But, If I send using Kombu Lib, the message is sent:

test_send_amqp_using_kombu_lib.py

from kombu import Connection, Exchange
from zato.common import DATA_FORMAT
from zato.server.service import Service
class Processa(Service):

def handle(self):  
    mensagem = {"count": 0}
    with Connection('amqp://guest:guest@localhost:5672//') as conn: 
        simple_queue = conn.SimpleQueue('ramais') 
        simple_queue.put(dumps(mensagem))
        simple_queue.close()       

Anyone can help me in this case?

The following settings are used for sending messages:

Zato 2.0.7
RabbitMQ 3.5.6
Red Hat Enterprise Linux 6.6 x86_64

Thank you,

Jean Michel

Hi @jeaanmichel,

there is an issue that has just been fixed in this commit:

But even then, I believe your exchange was defined to be ‘ramais’ in the RabbitMQ GUI but in the service you are using the value of ‘/ramais’, i.e. there is a leading slash character.

Kind regards.