com-poorbar commented on a change in pull request #12792:
URL: https://github.com/apache/pulsar/pull/12792#discussion_r753332572



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarCommandSenderImpl.java
##########
@@ -191,7 +191,18 @@ public void sendActiveConsumerChange(long consumerId, 
boolean isActive) {
             return;
         }
         cnx.ctx().writeAndFlush(
-                Commands.newActiveConsumerChange(consumerId, isActive),
+                Commands.newActiveConsumerChange(consumerId, isActive, null),
+                cnx.ctx().voidPromise());
+    }
+
+    @Override
+    public void sendActiveConsumerChange(long consumerId, String 
keySharedProps) {
+        if 
(!Commands.peerSupportsActiveConsumerListener(cnx.getRemoteEndpointProtocolVersion()))
 {
+            // if the client is older than `v12`, we don't need to send 
consumer group changes.
+            return;
+        }
+        cnx.ctx().writeAndFlush(
+                Commands.newActiveConsumerChange(consumerId, true, 
keySharedProps),

Review comment:
       [#6555 At this Question 
](https://github.com/apache/pulsar/issues/6555#issuecomment-903172278). I see 
you answer him "We have a consumer events listener 
https://github.com/apache/pulsar/blob/6704f12104219611164aa2bb5bbdfc929613f1bf/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ConsumerEventListener.java,
 users need to register a listener for getting the new events of the consumer 
". So I think it will be implements by a event, not a message




-- 
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