jiazhai commented on a change in pull request #3835: [pulsar-client-tools] Add 
support for websocket produce/consume command
URL: https://github.com/apache/pulsar/pull/3835#discussion_r266241782
 
 

 ##########
 File path: 
pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/CmdConsume.java
 ##########
 @@ -151,5 +188,152 @@ public int run() throws PulsarClientException, 
IOException {
         }
 
         return returnCode;
+
+    }
+
+    @SuppressWarnings("deprecation")
+    private int consumeFromWebSocket(String topic) {
+        int numMessagesConsumed = 0;
+        int returnCode = 0;
+
+        TopicName topicName = TopicName.get(topic);
+        
+        String wsTopic = String.format(
+                "%s/%s/" + (StringUtils.isEmpty(topicName.getCluster()) ? "" : 
topicName.getCluster() + "/")
+                        + "%s/%s/%s?subscriptionType=%s",
+                topicName.getDomain(), topicName.getTenant(), 
topicName.getNamespacePortion(), topicName.getLocalName(),
+                subscriptionName, subscriptionType.toString());
+        
+        /*String wsTopic = topicName.getDomain() + "/" +  topicName.getTenant()
 
 Review comment:
   remove this?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to