๐ฆ๐ต๐ฎ๐ฟ๐ฒ๐ฑ ๐๐ถ๐ฏ๐ฟ๐ฎ๐ฟ๐ ๐๐ต๐ฎ๐ผ๐ โ ๐๐ถ๐ป๐ด ๐๐ผ๐ป๐ด! ๐
Imagine an internal shared library that handles RabbitMQ connections, queues, and consumers for ~50 microservices running in Kubernetes.
๐ฆ๐ต๐ฎ๐ฟ๐ฒ๐ฑ ๐๐ถ๐ฏ๐ฟ๐ฎ๐ฟ๐ ๐๐ต๐ฎ๐ผ๐ โ ๐๐ถ๐ป๐ด ๐๐ผ๐ป๐ด! ๐
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