jerrypeng commented on a change in pull request #7647:
URL: https://github.com/apache/pulsar/pull/7647#discussion_r459712534



##########
File path: 
pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java
##########
@@ -142,6 +142,8 @@ public static FunctionDetails convert(FunctionConfig 
functionConfig, ClassLoader
         Function.SubscriptionType subType = 
((functionConfig.getRetainOrdering() != null && 
functionConfig.getRetainOrdering())
                 || 
FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE.equals(functionConfig.getProcessingGuarantees()))
                 ? Function.SubscriptionType.FAILOVER
+                : (functionConfig.getRetainKeyOrdering() != null && 
functionConfig.getRetainKeyOrdering())

Review comment:
       Can we re-organize this giant conditional statement to be more readable?
   
   if (effectively-once) {
      subType = Failover
   } else if (retain order) {
      subType = failover
   } else if (retain key order) {
    subType = shared_key
   } else {
     subType = shared
   }




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


Reply via email to