Skip to content

Commit

Permalink
Revert "Changing default function subscription to be function name, n…
Browse files Browse the repository at this point in the history
…ot FQFN"

This reverts commit 186e63b.
  • Loading branch information
lhotari committed Jun 23, 2021
1 parent 105a1d3 commit 653aeca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ public Function.FunctionDetails.ComponentType calculateSubjectType(Function.Func
}

public static String getDefaultSubscriptionName(String tenant, String namespace, String name) {
// Hacking this to just return the function name. Using a FQFN breaks the REST endpoints
// that deal with subscriptions
return name;
return FunctionCommon.getFullyQualifiedName(tenant, namespace, name);
}

public static String getDefaultSubscriptionName(Function.FunctionDetails functionDetails) {
Expand Down
5 changes: 3 additions & 2 deletions pulsar-functions/instance/src/main/python/python_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ def run(self):
if self.instance_config.function_details.source.subscriptionType == Function_pb2.SubscriptionType.Value("FAILOVER"):
mode = pulsar._pulsar.ConsumerType.Failover

# Default subscription to function name
subscription_name = str(self.instance_config.function_details.name)
subscription_name = str(self.instance_config.function_details.tenant) + "/" + \
str(self.instance_config.function_details.namespace) + "/" + \
str(self.instance_config.function_details.name)

properties = util.get_properties(util.getFullyQualifiedFunctionName(
self.instance_config.function_details.tenant,
Expand Down

0 comments on commit 653aeca

Please sign in to comment.