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);
|
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,
|
void Exchange::publish(const QString &key, const QString &message,
|
||||||
const MessageProperties &properties)
|
const MessageProperties &properties)
|
||||||
{
|
{
|
||||||
|
|
@ -223,7 +204,7 @@ void Exchange::publish(const QString &key, const QByteArray &message,
|
||||||
QByteArray arguments;
|
QByteArray arguments;
|
||||||
QDataStream out(&arguments, QIODevice::WriteOnly);
|
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, d->name);
|
||||||
Frame::writeField('s', out, key);
|
Frame::writeField('s', out, key);
|
||||||
out << qint8(0);
|
out << qint8(0);
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@ public:
|
||||||
ExchangeOptions option() const;
|
ExchangeOptions option() const;
|
||||||
|
|
||||||
virtual ~Exchange();
|
virtual ~Exchange();
|
||||||
|
|
||||||
|
// AMQP Exchange
|
||||||
void declare(ExchangeType type = Direct,
|
void declare(ExchangeType type = Direct,
|
||||||
ExchangeOptions options = NoOptions,
|
ExchangeOptions options = NoOptions,
|
||||||
const Frame::TableField &args = Frame::TableField());
|
const Frame::TableField &args = Frame::TableField());
|
||||||
|
|
@ -48,10 +50,7 @@ public:
|
||||||
const Frame::TableField &args = Frame::TableField());
|
const Frame::TableField &args = Frame::TableField());
|
||||||
void remove(bool ifUnused = true, bool noWait = true);
|
void remove(bool ifUnused = true, bool noWait = true);
|
||||||
|
|
||||||
void bind(Queue *queue);
|
// AMQP Basic
|
||||||
void bind(const QString &queueName);
|
|
||||||
void bind(const QString &queueName, const QString &key);
|
|
||||||
|
|
||||||
void publish(const QString &key, const QString &message,
|
void publish(const QString &key, const QString &message,
|
||||||
const MessageProperties &properties = MessageProperties());
|
const MessageProperties &properties = MessageProperties());
|
||||||
void publish(const QString &key, const QByteArray &message,
|
void publish(const QString &key, const QByteArray &message,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue