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 2022/06/07 06:11:31 UTC

[GitHub] [pulsar-client-go] liangyuanpeng commented on a diff in pull request #783: add shared subscription priority level

liangyuanpeng commented on code in PR #783:
URL: https://github.com/apache/pulsar-client-go/pull/783#discussion_r890800632


##########
pulsar/consumer_impl.go:
##########
@@ -72,6 +73,14 @@ func newConsumer(client *client, options ConsumerOptions) (Consumer, error) {
 		return nil, newError(SubscriptionNotFound, "subscription name is required for consumer")
 	}
 
+	if options.PriorityLevel <= 0 {
+		options.PriorityLevel = 0
+	}
+
+	if options.Type != Shared {

Review Comment:
   Does we need this?



##########
pulsar/consumer_impl.go:
##########
@@ -72,6 +73,14 @@ func newConsumer(client *client, options ConsumerOptions) (Consumer, error) {
 		return nil, newError(SubscriptionNotFound, "subscription name is required for consumer")
 	}
 
+	if options.PriorityLevel <= 0 {
+		options.PriorityLevel = 0

Review Comment:
   It should be return error. Ref: https://github.com/apache/pulsar/blob/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBuilderImpl.java#L254



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