remove convenience bind methods from exchange, reducing the confusion about
how queues are actually bound to an exchange (not the other way around)
This commit is contained in:
parent
eaee35df12
commit
6f05bf5ef9
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue