grishaf opened a new pull request, #1487:
URL: https://github.com/apache/pulsar-client-go/pull/1487
Add PriorityLevel field to ConsumerOptions to allow setting the
priority level for consumers on Shared and Failover subscriptions,
matching the Java client's ConsumerBuilder.priorityLevel(int) API.
In Shared subscription mode, the broker dispatches messages to the
highest priority consumers first (0 = max priority). In Failover
subscription mode for partitioned topics, the broker selects the
active consumer based on priority level and lexicographic consumer
name sorting.
Previously the Go client hardcoded PriorityLevel to nil in the
CommandSubscribe protobuf message. This change threads the user-
provided priority level through ConsumerOptions -> partitionConsumerOpts
-> CommandSubscribe.
Negative priority levels are rejected with InvalidConfiguration error,
matching the Java client's IllegalArgumentException behavior.
Master Issue: apache/pulsar#134
Supersedes: #783 (closed without merge, lacked tests and had validation
bugs)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]