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/07/14 00:11:47 UTC

[GitHub] [pulsar] nlu90 opened a new issue #11307: [go function] Not using the provided `subscriptionName` in the config to read from pulsar cluster

nlu90 opened a new issue #11307:
URL: https://github.com/apache/pulsar/issues/11307


   **Describe the bug**
   When `SubName` is set for go functions:
   ```
   pulsarctl.FuncConfig{
   		Tenant:    common.TenantFlows,
   		Namespace: common.NamespaceScopes,
   		Name:      agent.UUID,
   		Inputs: []string{
   			common.TopicName(common.TenantFlows, common.NamespaceScopes, agent.Scope),
   		},
   		SubName:              agent.UUID,
   		Output:               common.FlowsTopic(common.NamespaceAgentResults, agent.UUID),
   		LogTopic:             common.FlowsTopic(common.NamespaceAgentLogs, agent.UUID),
   		Parallelism:          1,
   		ProcessingGuarantees: "AT_LEAST_ONCE",
   		AutoAck:              true,
   		RetainOrdering:       true,
   		Runtime:              "GO",
   		CleanupSubscription:  true,
   		UserConfig:           map[string]interface{}{"config": userConfigString},
   	}
   ```
   
   The actual subscription name is not correct: (it's using the default `tenant/namespace/function_name` instead of the `subName`)
   ```
   ❯ pulsarctl subscriptions list persistent://flows/scopes/test
   +-------------------------------------+
   |            SUBSCRIPTIONS            |
   +-------------------------------------+
   | flows/scopes/6TmmWogtui4MUnzmgPMgyW |
   +-------------------------------------+
   ```
   
   **To Reproduce**
   Steps to reproduce the behavior:
   As described above
   
   **Expected behavior**
   Once the `subName` is set for go functions, the go instance runtime should use the `subName` instead of the default `tenant/namespace/func_name` to consume from pulsar cluster.
   


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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] nlu90 commented on issue #11307: [go function] Not using the provided `subscriptionName` in the config to read from pulsar cluster

Posted by GitBox <gi...@apache.org>.
nlu90 commented on issue #11307:
URL: https://github.com/apache/pulsar/issues/11307#issuecomment-879485371


   @flowchartsman Can provide more details if needed.
   


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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] nlu90 commented on issue #11307: [go function] Not using the provided `subscriptionName` in the config to read from pulsar cluster

Posted by GitBox <gi...@apache.org>.
nlu90 commented on issue #11307:
URL: https://github.com/apache/pulsar/issues/11307#issuecomment-879485717


   The root cause should be here:
   https://github.com/apache/pulsar/blob/master/pulsar-function-go/pf/instance.go#L264
   
   And later this subscription name is used: 
   https://github.com/apache/pulsar/blob/master/pulsar-function-go/pf/instance.go#L285


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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] wolfstudy closed issue #11307: [go function] Not using the provided `subscriptionName` in the config to read from pulsar cluster

Posted by GitBox <gi...@apache.org>.
wolfstudy closed issue #11307:
URL: https://github.com/apache/pulsar/issues/11307


   


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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org