[Issue 11075] Use the subscription name defined in function details
Fixes
### Motivation
See , python functions don't use the given subscription name for the input topic consumer.
### Modifications
Use `function_details.source.subscriptionName` as the subscription name if it's non-blank.
@@ -136,6 +136,9 @@ class PythonInstance(object):
if self.instance_config.function_details.source.subscriptionType == Function_pb2.SubscriptionType.Value("FAILOVER"):
mode = pulsar._pulsar.ConsumerType.Failover
+ subscription_name = self.instance_config.function_details.source.subscriptionName
+
+ if not (subscription_name and subscription_name.strip()):
subscription_name = str(self.instance_config.function_details.tenant) + "/" + \
str(self.instance_config.function_details.namespace) + "/" + \
str(self.instance_config.function_details.name)
