Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amqpcpp lib stops to work after publish message to invalid exchange #42

Closed
morden2k opened this issue Aug 7, 2015 · 1 comment
Closed

Comments

@morden2k
Copy link

morden2k commented Aug 7, 2015

amqpcpp lib stop to work after publish to invalid exchange


The code:

AMQP::Channel*    m_channel;

void RpcHandler::send_ack(const AMQP::Message &message, quint64 deliveryTag, const QByteArray& ba)
{
    AMQP::Envelope envelope(ba.data());
    envelope.setCorrelationID(message.correlationID());


    //    if (!m_channel->publish("", message.replyTo(), envelope))
    //        LDEBUG() << "qqqqqqqqqqq";

    // after this string library stop to work
    //     if coment this string and uncomment previous publish
    //    with correct exchange all is work (ack, receiving new messages etc.)
    //
    if (!m_channel->publish("ajhsakjdhasdkjhas", message.replyTo(), envelope))
        LDEBUG() << "qqqqqqqqqqq";

    if (!m_channel->ack(deliveryTag))
        LDEBUG() << "sssssss1";
}

After sending message to invalid exchange all stop to work:

  1. When I sends ack of my previous message, server does not receives it like I did not send ack. After exit from amqpcpp callback, message status on server changes from unacked to ready status, like I did not send ack.
    Also publish with invalid exchange return true, ack also returns true
  2. No new messages does not comes to my all consumed queus. Also if I send messages to other queues. Messages are pushes to RabbitMQ server and does not comes to my service anymore
  3. No any error reporting/conection closing on AMQP::ConnectionHandler::onError
  4. No any errors from ack or invalid publish

I have only error message on rabbitMq server (/var/log/rabbitmq/rabbit@morden.log)

=ERROR REPORT==== 7-Aug-2015::17:46:25 ===
connection <0.2479.0>, channel 1 - soft error:
{amqp_error,not_found,"no exchange 'asasas' in vhost '/'",'basic.publish'}

No any errors about my ack.

Could you halp me? Is it bug? I do not want to stop working library, I want to have any errors as minimum e.g. ConnectionHandler::onError if everething stopped or return false from publish without stopping working library or any way to detect this situation in code (only from RabitMQ log file in current moment). Just restarting of my service is helping (I did not try to close and reopen connection). Would be great to have false from publish call and all continue to work.

amqpcpp version which I uses I did not find in source code or headers files or readme. So I do not know my current version of library(((

Thank you.

@morden2k
Copy link
Author

Sorry. Invalid issue. I had published message to invalid project. amqp-cpp (from CopernicaMarketingSoftware) and amqpcpp it is diferent projects (I just forgot to add hyphen in project name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant