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

Do not receive declared signal from QAMQP::Queue #30

Open
davidip opened this issue Sep 25, 2013 · 1 comment
Open

Do not receive declared signal from QAMQP::Queue #30

davidip opened this issue Sep 25, 2013 · 1 comment

Comments

@davidip
Copy link

davidip commented Sep 25, 2013

Thank you for QAMQP. I am using the sample code snippet (shown below) from ReceiveLog.h in my Qt application. I just try to see whether I can make connection and binding to the RabbitMQ server.

    // Create AMQP client
    QString address("amqp://guest:[email protected]:5672/");
    QAMQP::Client* client = new QAMQP::Client(this);
    client->open(QUrl(address));

    // Create an exclusive queue
    queue_ = client->createQueue();
    queue_->declare("", Queue::Exclusive);

    connect(queue_, SIGNAL(declared()), this, SLOT(declared()));
    connect(queue_, SIGNAL(messageReceived()), this, SLOT(newMessage()));

Apparently the connection is OK according to the debugging outputs shown below. But there is never a signal emitted for declared() so my slot function was never called. I searched the amqp_queue.cpp source code and I don't see "emit declared()". Are the sample code up-to-date? Thank you for your help.

Debug output on the console:
Connection:

Start
version_major: 0
version_minor: 9
version : QVariant(QString, "3.0.4")
product : QVariant(QString, "RabbitMQ")
platform : QVariant(QString, "Erlang/OTP")
capabilities : FIELD_TABLE
copyright : QVariant(QString, "Copyright (C) 2007-2013 VMware, Inc.")
information : QVariant(QString, "Licensed under the MPL. See http://www.rabbitmq.com/")
mechanisms: PLAIN AMQPLAIN
locales: en_US
Connection:
Tune
channel_max: 0
frame_max: 131072
heartbeat: 600
Connection:
OpenOK
Open channel #1
Channel#1:

@fuCtor
Copy link
Owner

fuCtor commented Sep 29, 2013

Emit does't call directly. Emit is called in file amqp_queue.cpp, line 275.

You can try old example: https://github.com/fuCtor/QAMQP/blob/e56a6afa9d0f39f5c4af45500c07c9f7980cf2ec/src/test.cpp

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

2 participants