From d66d50b103ab12df58132ce17ed5892df29b4b5c Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 21 Mar 2007 19:12:14 +0000 Subject: 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 --- qpid/cpp/tests/topic_publisher.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'qpid/cpp/tests/topic_publisher.cpp') 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(); } -- cgit v1.2.1