โ† Back to list

๐—ฆ๐—ต๐—ฎ๐—ฟ๐—ฒ๐—ฑ ๐—Ÿ๐—ถ๐—ฏ๐—ฟ๐—ฎ๐—ฟ๐˜† ๐—–๐—ต๐—ฎ๐—ผ๐˜€ โ€” ๐——๐—ถ๐—ป๐—ด ๐——๐—ผ๐—ป๐—ด! ๐Ÿ””

Imagine an internal shared library that handles RabbitMQ connections, queues, and consumers for ~50 microservices running in Kubernetes.

Saurabh Garg ยท 2026-08-21 13:21 ยท 0 claps ยท 2.0 min read
#backend-engineering #architecture #microservice-architecture #microservices #c-sharp-programming
Open on Medium โ†—
Wiki topics: ๐Ÿ’ป ยท Programming ๐ŸŒ ยท Web Development โ˜๏ธ ยท DevOps & Cloud ๐Ÿ“š ยท Books & Reading ๐Ÿ›๏ธ ยท Architecture ๐Ÿƒ ยท Running & Endurance

๐—ฆ๐—ต๐—ฎ๐—ฟ๐—ฒ๐—ฑ ๐—Ÿ๐—ถ๐—ฏ๐—ฟ๐—ฎ๐—ฟ๐˜† ๐—–๐—ต๐—ฎ๐—ผ๐˜€ โ€” ๐——๐—ถ๐—ป๐—ด ๐——๐—ผ๐—ป๐—ด! ๐Ÿ””

Imagine an internal shared library that handles RabbitMQ connections, queues, and consumers for ~50 microservices running in Kubernetes.

Now RabbitMQ needs to move from 3.13.7 โ†’ 4.0.4 for ongoing support and newer queueing models such as quorum queues.

But thereโ€™s a problem.

RabbitMQ 4.x introduces a breaking change in queue declarations, which impacts the existing shared library โ€” and potentially all 50 services.

So the real question becomes:

How do we manage shared dependencies across dozens of microservices without turning every upgrade into a coordinated fire drill?

๐——๐—ฎ๐—ป๐—ด๐—ฒ๐—ฟ๐—ผ๐˜‚๐˜€ ๐—ฎ๐—ฝ๐—ฝ๐—ฟ๐—ผ๐—ฎ๐—ฐ๐—ต โŒ

Upgrade RabbitMQ โ†“ Upgrade RabbitMQ.Client โ†“ Upgrade shared library โ†“ Force 50 microservices to upgrade โ†“ Everything breaks simultaneously ๐Ÿ˜†

Two ๐—•๐—ฒ๐˜๐˜๐—ฒ๐—ฟ ๐—”๐—ฝ๐—ฝ๐—ฟ๐—ผ๐—ฎ๐—ฐ๐—ต๐—ฒ๐˜€ ๐Ÿ˜Ž

Donโ€™t make all 50 microservies understand RabbitMQ 4.0.4 at once. Upgrade the shared RabbitMQ library first, make it backward-compatible at the application API level, then roll the library version through the services in controlled batches.

Two approaches coming to my mind ๐Ÿญ. ๐—–๐—ฃ๐—  + ๐—š๐—ถ๐˜ ๐—ฆ๐˜‚๐—ฏ๐—บ๐—ผ๐—ฑ๐˜‚๐—น๐—ฒ (How do we control which version of our shared library each service consumes?) Nuget Central Package Management (CPM) is useful to centrally controlling Nuget versions across projects, while Git submodules can pin each microservice repository to a specific version/commit of the shared library. Microsoft specifically supports centralized package versions through Directory.Packages.props. CPM manages NuGet dependency versions. It does not solve the compatibility problem between. Thatโ€™s where the shared library API design + Git versioning/submodules come into play.

Instead of exposing RabbitMQ declaration details to every service, make the shared library own the RabbitMQ-specific behavior. This is the critical abstraction. Make the shared library backward compatible. Now bring in Git Submodule for the shared library. The submodule let you point to a specific commit. Order Service can now point to commit abc123 while payment service can have def456.

๐—›๐—ผ๐˜„๐—ฒ๐˜ƒ๐—ฒ๐—ฟ, ๐—ถ๐—ณ ๐˜๐—ต๐—ฒ ๐˜€๐—ต๐—ฎ๐—ฟ๐—ฒ๐—ฑ ๐—น๐—ถ๐—ฏ๐—ฟ๐—ฎ๐—ฟ๐˜† ๐—ถ๐˜€ ๐—ฎ ๐—ป๐—ผ๐—ฟ๐—บ๐—ฎ๐—น ๐—ก๐˜‚๐—š๐—ฒ๐˜ ๐—น๐—ถ๐—ฏ๐—ฟ๐—ฎ๐—ฟ๐˜†, ๐—œ ๐˜„๐—ผ๐˜‚๐—น๐—ฑ ๐—ณ๐—ฎ๐˜ƒ๐—ผ๐—ฟ ๐—ก๐˜‚๐—š๐—ฒ๐˜ ๐˜ƒ๐—ฒ๐—ฟ๐˜€๐—ถ๐—ผ๐—ป๐—ถ๐—ป๐—ด ๐—ผ๐˜ƒ๐—ฒ๐—ฟ ๐—š๐—ถ๐˜ ๐˜€๐˜‚๐—ฏ๐—บ๐—ผ๐—ฑ๐˜‚๐—น๐—ฒ๐˜€ ๐—ณ๐—ผ๐—ฟ ๐—ฏ๐—ถ๐—ป๐—ฎ๐—ฟ๐˜† ๐—ฑ๐—ฒ๐—ฝ๐—ฒ๐—ป๐—ฑ๐—ฒ๐—ป๐—ฐ๐˜†. ๐—–๐—ฃ๐— +๐—ก๐˜‚๐—š๐—ฒ๐˜ ๐—ด๐—ถ๐˜ƒ๐—ฒ๐˜€ ๐˜†๐—ผ๐˜‚ ๐—ฐ๐—น๐—ฒ๐—ฎ๐—ป๐—ฒ๐—ฟ ๐—ฑ๐—ฒ๐—ฝ๐—ฒ๐—ป๐—ฑ๐—ฒ๐—ป๐—ฐ๐˜† ๐—บ๐—ฎ๐—ป๐—ฎ๐—ด๐—ฒ๐—บ๐—ฒ๐—ป๐˜, ๐˜„๐—ต๐—ถ๐—น๐—ฒ ๐—š๐—ถ๐˜ ๐˜€๐˜‚๐—ฏ๐—บ๐—ผ๐—ฑ๐˜‚๐—น๐—ฒ๐˜€ ๐—ฎ๐—ฟ๐—ฒ ๐—บ๐—ผ๐—ฟ๐—ฒ ๐—ฎ๐—ฝ๐—ฝ๐—ฟ๐—ผ๐—ฝ๐—ฟ๐—ถ๐—ฎ๐˜๐—ฒ ๐—ถ๐—ณ ๐˜†๐—ผ๐˜‚ ๐—ด๐—ฒ๐—ป๐˜‚๐—ถ๐—ป๐—ฒ๐—น๐˜† ๐—ป๐—ฒ๐—ฒ๐—ฑ ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ-๐—น๐—ฒ๐˜ƒ๐—ฒ๐—น ๐—ฐ๐—ผ๐˜‚๐—ฝ๐—น๐—ถ๐—ป๐—ด.

๐Ÿฎ. ๐—จ๐—บ๐—ฏ๐—ฟ๐—ฒ๐—น๐—น๐—ฎ ๐—ฃ๐—ฎ๐—ฐ๐—ธ๐—ฎ๐—ด๐—ฒ ๐—ฆ๐˜๐—ฟ๐—ฎ๐˜๐—ฒ๐—ด๐˜† (How do we define and distribute a compatible set of messaging dependencies as one versioned unit?) An alternative approach to above technique is the use of Umbrella packages also called meta-packages. This technique involves creating a dedicated NuGet package that groups and declare dependencies on other internal or external package with specific versions. By referencing this umbrella package, each project implicitly brings along all the necessary dependencies at predefined versions. This approach centralizes dependency control without needing to manage multiple configuration files or repositories.

Press enter or click to view image in full size

RabbitMQ change โ†’ Shared library โ†’ Umbrella package โ†’ Controlled service rollout

The goal isnโ€™t just to upgrade RabbitMQ. Itโ€™s to ๐—ฟ๐—ฒ๐—ฑ๐˜‚๐—ฐ๐—ฒ ๐˜๐—ต๐—ฒ ๐—ฏ๐—น๐—ฎ๐˜€๐˜ ๐—ฟ๐—ฎ๐—ฑ๐—ถ๐˜‚๐˜€ ๐—ผ๐—ณ ๐˜๐—ต๐—ฒ ๐—ป๐—ฒ๐˜…๐˜ ๐—ฏ๐—ฟ๐—ฒ๐—ฎ๐—ธ๐—ถ๐—ป๐—ด ๐—ฐ๐—ต๐—ฎ๐—ป๐—ด๐—ฒ.


๋ฉ”ํƒ€๋ฐ์ดํ„ฐ
post_id
2dfe10366c39
slug
-2dfe10366c39
url
https://medium.com/@srv.netflix2025/-2dfe10366c39
canonical_url
https://medium.com/@srv.netflix2025/-2dfe10366c39
author_url
https://medium.com/@srv.netflix2025
status
ok
fetched_at
2026-08-27 08:23:07