You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/04/30 07:50:48 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #10446: [Issue 10445][pulsar-io] Exposed SubscriptionType in the ConnectorContext

eolivelli commented on a change in pull request #10446:
URL: https://github.com/apache/pulsar/pull/10446#discussion_r623683947



##########
File path: pulsar-io/core/src/main/java/org/apache/pulsar/io/core/ConnectorContext.java
##########
@@ -68,7 +69,15 @@
      * @return the namespace this source belongs to
      */
     String getNamespace();
-    
+
+    /**
+     * Get subscription type
+     * @return subscription type
+     */
+    default SubscriptionType getSubscriptionType() {

Review comment:
       isn't it better to add this method in SinkContext instead of ConnectorContext ?
   
   it does not make sense to have this for "Sources" for instance

##########
File path: pulsar-io/core/src/main/java/org/apache/pulsar/io/core/ConnectorContext.java
##########
@@ -68,7 +69,15 @@
      * @return the namespace this source belongs to
      */
     String getNamespace();
-    
+
+    /**
+     * Get subscription type
+     * @return subscription type
+     */
+    default SubscriptionType getSubscriptionType() {
+        return null;

Review comment:
       Can we throw "UnsupportedOperationException" ?




-- 
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:
users@infra.apache.org