Skip to content

Commit

Permalink
stop consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit committed Nov 22, 2022
1 parent d2b8277 commit 79c8d42
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.apache.rocketmq.client.apis.message.Message;
import org.apache.rocketmq.client.apis.producer.Producer;
import org.apache.rocketmq.client.apis.producer.SendReceipt;
import org.apache.rocketmq.client.java.impl.ClientImpl;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -102,6 +103,7 @@ void tearDown() throws IOException {
}
if (consumer != null) {
// Not calling consumer.close(); because it takes a lot of time to complete
((ClientImpl) consumer).stopAsync();
}
container.close();
}
Expand Down

0 comments on commit 79c8d42

Please sign in to comment.