diff options
| author | Alan Conway <aconway@apache.org> | 2007-03-21 19:12:14 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-03-21 19:12:14 +0000 |
| commit | d66d50b103ab12df58132ce17ed5892df29b4b5c (patch) | |
| tree | 0cdeb9f8365be75539e000f7e1d4a76387655b94 /qpid/cpp/tests/topic_publisher.cpp | |
| parent | 6625d0c47f5252af8d64abce773583ec27f28116 (diff) | |
| download | qpid-python-d66d50b103ab12df58132ce17ed5892df29b4b5c.tar.gz | |
Refactored client side for dual-mode Channel supporting either 0-9 Message or 0-8 Basic.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@520972 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/tests/topic_publisher.cpp')
| -rw-r--r-- | qpid/cpp/tests/topic_publisher.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/qpid/cpp/tests/topic_publisher.cpp b/qpid/cpp/tests/topic_publisher.cpp index 0e6c63ab35..2fd1e6b810 100644 --- a/qpid/cpp/tests/topic_publisher.cpp +++ b/qpid/cpp/tests/topic_publisher.cpp @@ -129,7 +129,7 @@ int main(int argc, char** argv) { //set up listener Publisher publisher(&channel, "topic_control", args.getTransactional()); std::string tag("mytag"); - channel.getBasic().consume(response, tag, &publisher, args.getAckMode()); + channel.consume(response, tag, &publisher, args.getAckMode()); channel.start(); int batchSize(args.getBatches()); @@ -187,12 +187,13 @@ int64_t Publisher::publish(int msgs, int listeners, int size){ { Monitor::ScopedLock l(monitor); for(int i = 0; i < msgs; i++){ - channel->getBasic().publish(msg, Exchange::STANDARD_TOPIC_EXCHANGE, controlTopic); + channel->publish( + msg, Exchange::STANDARD_TOPIC_EXCHANGE, controlTopic); } //send report request Message reportRequest; reportRequest.getHeaders().setString("TYPE", "REPORT_REQUEST"); - channel->getBasic().publish(reportRequest, Exchange::STANDARD_TOPIC_EXCHANGE, controlTopic); + channel->publish(reportRequest, Exchange::STANDARD_TOPIC_EXCHANGE, controlTopic); if(transactional){ channel->commit(); } @@ -216,7 +217,7 @@ void Publisher::terminate(){ //send termination request Message terminationRequest; terminationRequest.getHeaders().setString("TYPE", "TERMINATION_REQUEST"); - channel->getBasic().publish(terminationRequest, Exchange::STANDARD_TOPIC_EXCHANGE, controlTopic); + channel->publish(terminationRequest, Exchange::STANDARD_TOPIC_EXCHANGE, controlTopic); if(transactional){ channel->commit(); } |
