Skip to content

Commit

Permalink
[ISSUE #935] C++ simple consumer should remove destructor (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhimins authored Feb 11, 2025
1 parent 0425196 commit f117e73
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions cpp/examples/ExampleSimpleConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ int main(int argc, char* argv[]) {
.withAwaitDuration(std::chrono::seconds(10))
.build();

// Should use while (true) instead
for (int j = 0; j < 30; j++) {
std::vector<MessageConstSharedPtr> messages;
std::error_code ec;
Expand Down
2 changes: 0 additions & 2 deletions cpp/include/rocketmq/SimpleConsumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class SimpleConsumerBuilder;

class SimpleConsumer {
public:
~SimpleConsumer();

static SimpleConsumerBuilder newBuilder();

void subscribe(std::string topic, FilterExpression filter_expression);
Expand Down
4 changes: 0 additions & 4 deletions cpp/source/rocketmq/SimpleConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ SimpleConsumerBuilder SimpleConsumer::newBuilder() {
SimpleConsumer::SimpleConsumer(std::string group) : impl_(std::make_shared<SimpleConsumerImpl>(group)) {
}

SimpleConsumer::~SimpleConsumer() {
impl_->shutdown();
}

void SimpleConsumer::start() {
impl_->start();
}
Expand Down

0 comments on commit f117e73

Please sign in to comment.