From 6f05bf5ef95a1f29985ae097e0741f448ea5f82b Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Wed, 4 Jun 2014 23:44:07 -0400 Subject: [PATCH] remove convenience bind methods from exchange, reducing the confusion about how queues are actually bound to an exchange (not the other way around) --- src/amqp_exchange.cpp | 21 +-------------------- src/amqp_exchange.h | 7 +++---- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/amqp_exchange.cpp b/src/amqp_exchange.cpp index d801f42..5424c7e 100644 --- a/src/amqp_exchange.cpp +++ b/src/amqp_exchange.cpp @@ -181,25 +181,6 @@ void Exchange::remove(bool ifUnused, bool noWait) d->sendFrame(frame); } -void Exchange::bind(Queue *queue) -{ - Q_D(Exchange); - queue->bind(this, d->name); -} - -void Exchange::bind(const QString &queueName) -{ - Q_UNUSED(queueName); - qWarning("Not implemented"); -} - -void Exchange::bind(const QString &queueName, const QString &key) -{ - Q_UNUSED(queueName); - Q_UNUSED(key); - qWarning("Not implemented"); -} - void Exchange::publish(const QString &key, const QString &message, const MessageProperties &properties) { @@ -223,7 +204,7 @@ void Exchange::publish(const QString &key, const QByteArray &message, QByteArray arguments; QDataStream out(&arguments, QIODevice::WriteOnly); - out << qint16(0); //reserver 1 + out << qint16(0); //reserved 1 Frame::writeField('s', out, d->name); Frame::writeField('s', out, key); out << qint8(0); diff --git a/src/amqp_exchange.h b/src/amqp_exchange.h index 79fe964..31246ce 100644 --- a/src/amqp_exchange.h +++ b/src/amqp_exchange.h @@ -40,6 +40,8 @@ public: ExchangeOptions option() const; virtual ~Exchange(); + + // AMQP Exchange void declare(ExchangeType type = Direct, ExchangeOptions options = NoOptions, const Frame::TableField &args = Frame::TableField()); @@ -48,10 +50,7 @@ public: const Frame::TableField &args = Frame::TableField()); void remove(bool ifUnused = true, bool noWait = true); - void bind(Queue *queue); - void bind(const QString &queueName); - void bind(const QString &queueName, const QString &key); - + // AMQP Basic void publish(const QString &key, const QString &message, const MessageProperties &properties = MessageProperties()); void publish(const QString &key, const QByteArray &message,