From commits-return-17251-archive-asf-public=cust-asf.ponee.io@pulsar.apache.org Thu Nov 8 20:20:46 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A045A18072F for ; Thu, 8 Nov 2018 20:20:45 +0100 (CET) Received: (qmail 2038 invoked by uid 500); 8 Nov 2018 19:20:44 -0000 Mailing-List: contact commits-help@pulsar.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pulsar.apache.org Delivered-To: mailing list commits@pulsar.apache.org Received: (qmail 2028 invoked by uid 99); 8 Nov 2018 19:20:44 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2018 19:20:44 +0000 From: GitBox To: commits@pulsar.apache.org Subject: [GitHub] merlimat commented on a change in pull request #2961: Added pause and resume to Java client Consumer Message-ID: <154170484424.20857.17146891519350556055.gitbox@gitbox.apache.org> Date: Thu, 08 Nov 2018 19:20:44 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit merlimat commented on a change in pull request #2961: Added pause and resume to Java client Consumer URL: https://github.com/apache/pulsar/pull/2961#discussion_r232025742 ########## File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java ########## @@ -853,5 +853,15 @@ private void handleSubscribeOneTopicError(String topicName, Throwable error, Com return consumers.values().stream().collect(Collectors.toList()); } + @Override + public void pause() { + for (Map.Entry> e : consumers.entrySet()) e.getValue().pause(); Review comment: ```suggestion consumers.forEach((name, consumer) -> consumer.pause()); ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services