Closed jonekdahl closed 3 years ago
Hello Jon,
Yes, we are happy to add support for sessions. You are right, this can be read from the message header example such as KafkaHeaders.cs
PR is welcome, thanks
Hi again, there is now an initial PR for adding session support.
Thanks for merging the PR @yang-xiaodong. Would you consider making a preview release?
Hi @jonekdahl ,
Version 5.0.2-preview-135224594
has been released to nuget in a few minutes ago, Thanks for your PR!
@jonekdahl out of interest what do you use at the consumer side? Handhold or something like Masstransit?
@thisispaulsmith Our consumers use the Service Bus client libraries from Microsoft.
Hi,
First of all, thanks for creating CAP, it seems very useful!
We're planning to use CAP to implement the outbox pattern, publishing messages via Azure Service Bus that will be consumed by non-CAP services. We would like to use Service Bus sessions to ensure that multiple messages for the same entity are delivered in FIFO order, but it seems that Service Bus sessions are not supported by CAP.
As far as we could tell, there is no way to pass a session id in a message so that AzureServiceBusTransport will pick it up and propagate it correctly. If this is a misunderstanding, please enlighten us by showing us how to do it.
Our understanding is that, in order to implement sessions, a session id must be added as a special property in the Service Bus message. This is an example where we have extended the message construction in AzureServiceBusTransport with the
SessionId
property:Would you be interested in adding support for sessions? With your guidance, we could prepare a PR for this feature.