Conversation
… configurations Refactored filtering logic, added utility methods, extended validations, updated related tests, and enhanced handling of wildcard-based partitioning.
…astic consumer groups.
…features in consumer groups
|
Hey @colprog, does this make sense to you? thanks |
|
Hi @mtmk , Thanks for coming up with a patch so quickly. This is exactly what I wanted. If I understand correctly, using [-1] as partitioningWildcards will require nats-server 2.12+? |
|
hey @colprog
spot on! yes, server must be 2.12+ hence the test failures on 2.10 and 2.11. fixing them now. edit: tests are fixed. |
…el features in consumer group configurations
|
@jnmoyne @piotrpio heads up, this PR adds two .NET-only extensions to PCGroups that aren't in
Would be good to get your thoughts on whether these make sense to standardize across implementations, or if you'd approach them differently in Go. |
|
This is great, thanks! Actually there have been a few changes to the Go implementation lately and it's due for a new release, and we should synchronize the two. Multi-filter has actually already be done in Go :) synadia-io/orbit.go#44. The one difference however is since the plan is to cut a new release (as soon at that last PR gets merged in) I decided to add I like the idea of -1 for partition on the whole subject, so I'll add that to Go (and Java). Note that there are other PRs that have merged to the Go version since the original release with some small improvements that you should check out. |
|
Using -1 for partition, we could support orders.> or even > as filter, Is this something we should pursue is a future release? |
|
I would rather have |
…th `NatsPcgPartitioningFilter`, simplify validations, and update related tests.
|
thanks @jnmoyne I think all the feedback is addressed:
JSON config in KV should now be interoperable with Go and Java. |
|
hey @colprog thanks for getting the ball rolling on this one. Please let us know how you get on with the changes and please fell free to review the code if you have some time. |
|
Thanks, The changes looks good. |
jnmoyne
left a comment
There was a problem hiding this comment.
LGTM (after the changes since my last review)
Filters(string array) only — removed singleFilterpropertyPartitioningFiltersarray of{filter, partitioning_wildcards}pairs. removed separateFilter/Filters/PartitioningWildcardspropertiespartitioning_wildcardsarray[]instead of[-1]sentinel{partition}.{filter}(e.g.,0.orders.*) instead of{partition}.>Cross-implementation compatibility
JSON config stored in NATS KV is now interoperable with Go (synadia-io/orbit.go#44):
"filters"string array (no"filter"field)"partitioning_filters"array of{"filter": "...", "partitioning_wildcards": [...]}objects (no separate"filter"/"partitioning_wildcards"fields)partitioning_wildcardsarray[]— Go never had[-1], so this removes the interop gap{partition}.{filter}format matches Go behavior