Feature request: PinnedByCorrelation support in gRPC clients #431
innocentiv
started this conversation in
Ideas
Replies: 2 comments 4 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
@innocentiv I can bring this feature to the clients, as long as we agree that you won’t be able to update the consumer strategy to PinnedByCorrelation, since the server doesn’t support it, and we make sure this is well documented. I will asked them to fix this issue with updates in the db. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
According to documentation KurrentDB supports PinnedByCorrelation Consumer Strategy for Persistent Subscription: https://docs.kurrent.io/server/v25.0/features/persistent-subscriptions.html#consumer-strategies
This Consumer Strategy enable us to drastically reduce the amount of concurrency issues that may arise when processing sagas across multiple streams.
But I have noticed that this consumer strategy is not supported in the node client and only partially supported in the web UI and in the HTTP client (not supported in the $all subscription but supported in the stream subscription as $all subscription is not supported in HTTP client)
The gRPC protobuf schema on the server is inconsistent between creation and update and contains two separate way to update the consumer strategy:
ConsumerStrategy named_consumer_strategy = 13 [deprecated = true]
string consumer_strategy = 16;
which are defined in the schema type as
and in the server codebase as
respectively.
When using
consumer_strategy
in the node client instead ofnamed_consumer_strategy
(deprecated), I can actually set the proper 'PinnedByCorrelation' strategy:This is affecting both the subscription to $all and the subscription to stream. You can find here a fork with the modification I have made to the client to make it behave correctly for my usecase: master...innocentiv:KurrentDB-Client-NodeJS:master
This also apply to other clients as well, but I have opened this in Node repo as this is what we use.
PinnedByCorrelation is the most useful strategy for us, and looks like both the server schema and the clients needs some work to actually support it correctly. Is this going to be fixed in the future?
Beta Was this translation helpful? Give feedback.
All reactions