lucasbru commented on code in PR #23658:
URL: https://github.com/apache/kafka/pull/23658#discussion_r4156560182


##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/TopologyDescriptionPluginIntegrationTest.java:
##########
@@ -158,6 +158,34 @@ public void 
shouldPushTopologyDescriptionOnlyOnceForTwoMembers() throws Exceptio
         }
     }
 
+    @Test
+    public void shouldNotPushTopologyDescriptionWhenDisabledByClient() throws 
Exception {
+        final String appId = "topology-description-push-disabled-app";
+        final String inputTopic = "topology-description-push-disabled-input";
+        cluster.createTopic(inputTopic, 1, 1);
+
+        final Properties config = streamsConfig(appId);
+        config.put(StreamsConfig.TOPOLOGY_DESCRIPTION_PUSH_ENABLED_CONFIG, 
"false");
+
+        try (final Admin admin = createAdmin();
+             final KafkaStreams streams = new 
KafkaStreams(topology(inputTopic), config)) {
+            startApplicationAndWaitUntilRunning(streams);
+
+            // The broker has no stored description for this group and, 
exactly as in
+            // shouldPushTopologyDescriptionToPluginAfterJoin, keeps setting
+            // TopologyDescriptionRequired=true on every heartbeat to solicit 
one; the broker
+            // cannot tell that this client has the push disabled. Waiting 
several heartbeat
+            // intervals gives a suppressed client ample opportunity to push 
anyway if the
+            // client-side opt-out were broken.

Review Comment:
   Fixed, thanks - the comment now says the solicitation happens on the first 
heartbeat after join and the broker then backs off for 30s, rather than 
claiming repeated solicitation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to