dotnetcore / CAP

Distributed transaction solution in micro-service base on eventually consistency, also an eventbus with Outbox pattern
http://cap.dotnetcore.xyz
MIT License
6.61k stars 1.28k forks source link

Add NATS support #595

Closed araxis closed 3 years ago

araxis commented 4 years ago

Please add NATS support. www.nats.io

yang-xiaodong commented 4 years ago

Hello @araxis ,

Before this, I didn't know NATS. I spent some time reading the docs, and I found that it is divided into two parts NATS Server and NATS Streaming Server.

First let's talk about the NATS Server, According to the docs, it does not support the persistence and manual acknowledge features. For CAP, no persistence is tolerable, but the lack of acknowledge support is unacceptably , because it may cause message lost. (An exception occurred before the message was saved to the table)

NATS Streaming Server provides persistence and manual acknowledge support, but our goal seems to be NATS.

What do you think of this?

araxis commented 4 years ago

first Sorry for my bad English!!! you are right about Current version Of NATS. jetstream a new feature that is implementing ,merge NATS and NATS Streaming Capabilities.in fact ,at current time the only choice is NATS Stream .but I don't think Jetstream changes Base Concept and make big differences. again sorry for my bad English!!!

yang-xiaodong commented 4 years ago

@araxis I think we can using req/reply model for message reliability without NATS Streaming, I think it's a good way, more simpler and clear.

supports/nats branch already have the untested code, any suggestion or pull request is welcome

yang-xiaodong commented 4 years ago

After investigation, due to a small audience, we will suspend the merger of this feature.

If you need this feature, please vote under this issue.

yang-xiaodong commented 3 years ago

Supported in v5.0

araxis commented 3 years ago

thanks a lot.

Wagimo commented 4 months ago

Hello, do you have any example implementation for NATS with .Net Core? The documentation is not clear when sending messages or how they are received and manipulated. If you have something, it would be interesting if you shared it. thank you