cloops.microservices 1.0.13

There is a newer version of this package available.
See the version list below for details.
dotnet add package cloops.microservices --version 1.0.13
                    
NuGet\Install-Package cloops.microservices -Version 1.0.13
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="cloops.microservices" Version="1.0.13" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="cloops.microservices" Version="1.0.13" />
                    
Directory.Packages.props
<PackageReference Include="cloops.microservices" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add cloops.microservices --version 1.0.13
                    
#r "nuget: cloops.microservices, 1.0.13"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package cloops.microservices@1.0.13
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=cloops.microservices&version=1.0.13
                    
Install as a Cake Addin
#tool nuget:?package=cloops.microservices&version=1.0.13
                    
Install as a Cake Tool

CLOOPS Microservices SDK

An opinionated library to build highly available, lean and scalable cloud native microservices using NATS as primary communication layer.

🚀 Overview

The goal here is to minimize the undifferentiated work and give you all the bells and whistles for a lean, high performance and scalable microservices setup. Check out docs for more details on how this SDK works, and prepare to be impressed!

This SDK uses NATS as the primary way for your services to communicate with each other. i.e. No REST interface

💎 Why C# for Microservices?

Modern C# is an excellent choice for building microservices! It's lean, fast, and fully open source with cross-platform support. With .NET's native Linux support, you get exceptional performance that rivals or exceeds many other languages. C# offers a perfect balance of developer productivity, type safety, and runtime efficiency—making it ideal for high-throughput, low-latency microservices architectures. Plus, with features like async/await, minimal APIs, and native AOT compilation, you can build services that are both performant and maintainable.

It is highly recommended that you familiarize yourself with NATS. Below are some really good resources -

  1. YouTube Playlist
  2. Official Docs

This SDK focuses on building microserivices using NATS. It is based on the cloops.nats which provides annotations based way to define consumers and bunch of other foundational things. Please do check it out.

⚡ Why use NATS over REST?

  • Lower latency
  • Higher throughput
  • No protocol bloat
  • Can implement temporal decoupling quite easily
  • No additional hops for load balancing
  • Decentralized PKI based AuthN and AuthZ
  • No network ports exposed
  • Easy to create highly available, globally distributed services

If you would like to know more, I would highly recommend checking out below resources

Documentation

Check out the docs.

🌱 Environment Variables used by SDK

Below are the environment variables used by CLOOPS.NATS

  • NATS_URL
    • Specifies the NATS server URL. Defaults to tls://nats.ccnp.cloops.in:4222.
    • For running on prod CCNP, make sure you set it to tls://nats-headless.ccnp.cloops.in:4222 for faster within cluster operations.
  • NATS_CREDS
    • Inline content of the NATS credentials file used for authentication. No default.
  • NATS_SUBSCRIPTION_QUEUE_SIZE
    • This variable defines what should be the max limit of messages queued up for each subscription. Use this to control backpressure. Default: 20,000
  • NATS_CONSUMER_MAX_DOP
    • Defines maximum degree of parallelism for all consumers. These many messages can be processed in parallel from the message queue. Default: 128
    • This puts upper limit on rps (request per second), not literally, but indirectly. (e.g. if your avg latency is 200ms then max_dop * 5 is your max throughput). Increase this in order to support higher rps. Consider giving higher core / memory count as well.
  • (Caution) Minting Service related environment variables
    • Highly confidential. Only use in trusted services running on trusted infrastructure.
    • Used by minting service when you need your application to mint new NATS tokens.
    • NATS_ACCOUNT_SIGNING_SEED
      • Signing account seed
      • How to get it
        • On nats-box
        • run cd /data/nsc/nkeys/keys/A
        • run find . -type f -name "*.nk" -o -name "*.seed"
        • run cat <account-signing-public-key>.nk to get the account signing seed. (remember to pick public key of singing account not main account)
    • NATS_ACCOUNT_PUBLIC_KEY
      • Main account public key
      • How to get it
        • Run this on nats-box to get the account public key: nsc list keys --account=<account-name> (remember to pick the main account not signing key)
  • DEBUG
    • Turns on verbose logging and additional diagnostics when set to True. Defaults to False.
  • CCNPOTELENDPOINT
    • OTEL collector endpoint for exporting telemetry to CCNP. No default.
  • CCNPOTELHEADERS
    • Additional OTEL headers required when sending telemetry to CCNP. No default.
  • CLUSTER
    • Target cluster where the service runs. Defaults to ccnp.
  • CNSTR
    • SQL connection string. No default.
  • ENABLE_NATS_CONSUMERS
    • Controls whether NATS consumers start with the service. Defaults to False.

🧭 Additional Setup you might need to do

  1. Database deployments.
  2. NATS JetStream streams, consumer creation
  3. Secret management (Doppler) integration

These things are usually taken care at CI/CD level or as manual one time setup operations or combination of both. How to do these things highly varies based on project and company.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.13 89 1/11/2026
1.1.12 181 12/23/2025
1.1.11 143 12/23/2025
1.1.10 154 12/23/2025
1.1.9 124 12/21/2025
1.1.8 276 12/16/2025
1.1.7 237 12/16/2025
1.1.6 234 12/16/2025
1.1.5 237 12/16/2025
1.1.4 254 12/16/2025
1.1.3 241 12/16/2025
1.1.2 240 12/16/2025
1.1.1 236 12/16/2025
1.0.14 250 12/15/2025
1.0.13 238 12/15/2025
1.0.12 291 11/17/2025
1.0.11 292 11/17/2025
1.0.10 180 11/9/2025
1.0.9 217 11/9/2025
1.0.8 175 11/9/2025
Loading failed