Skip to content

docs: ADR for publishing a RabbitMQ settings update message#4654

Open
shepilov wants to merge 2 commits intomasterfrom
adr_common_setting_rabbitmq_publish
Open

docs: ADR for publishing a RabbitMQ settings update message#4654
shepilov wants to merge 2 commits intomasterfrom
adr_common_setting_rabbitmq_publish

Conversation

@shepilov
Copy link
Contributor

No description provided.

@shepilov shepilov requested a review from a team as a code owner January 30, 2026 09:52
@shepilov shepilov force-pushed the adr_common_setting_rabbitmq_publish branch from 2898820 to b519590 Compare January 30, 2026 09:56
This approach has several issues:

- **Synchronous blocking**: HTTP calls block the settings update operation
- **Version conflict complexity**: The code checks remote versions before updates, creating complex conflict resolution logic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was done by purpose. Because we need to have a source of truth.

I'm not sure we're dealing with that correctly from the common-settings app side right now.

If we have 2 app sending a message to update CS, we'll have an issue on CS side. And this cozy-stack today is the entry point of CS, the check was done there.

So if we remove this check, we need to be sure that CS can handle this stuff. cc @rezk2ll

Copy link
Contributor

@rezk2ll rezk2ll Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the version control is done in CS for incoming requests.

but IMO, the CS app can retire and the stack will handle it. so in reality, we will have only one app sending the message updates.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is CS app?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linagora/twake-workplace-common-settings

- **Version conflict complexity**: The code checks remote versions before updates, creating complex conflict resolution logic
- **Tight coupling**: Direct HTTP dependency on the common settings app
- **Failure propagation**: HTTP failures can affect the main settings update flow
- **No longer needed**: The common settings app is no longer actively updating settings, making version conflict checking obsolete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this point, can you elaborate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The common settings app is being deprecated, so the stack no longer needs to support conflict resolution

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are you calling "common settings app"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linagora/twake-workplace-common-settings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I didn't even know that there was a front app for this API. This front app is not used anywhere.

The version's check on stack was not done because of that, it was done to be sure that we're sending the up to date data. And be sure that the user updated the latest version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I still don't understand. We will alwaus need this backend app right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the stack handles the message sending part, we no longer need this app.

The CS app was created because that stack could not send RabbitMQ messages and also connect to different RabbitMQ servers on a different infra.

Both of those issues are solved .

The other argument to keep the CS app was the on-prem installations. But I believe now it's mandatory to ship the stack on-prem if you want common settings. so really, no need to keep the app

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we still need CS app to consume the message, no?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, the other apps will consume the message directly no need for CS to relay the message.

CS app was exposing an API to the stack -> the stack sends the settings -> the app stores the settings and checks the version etc -> then sends a rabbitmq message to everyone.

The stack is already a copy of the source of the truth and is now capable of sending the RabbitMQ messages. so we just need to add the version control check and replace the API call with a RabbitMQ message.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But today we have a DB for CS, no? I liked the idea of having an external DB for that. Don't we have a "script" reading this DB to send event in order to fully align all the listeners (in case of something not working? Like what we had few weeks ago?) If we don't have this external DB anymore, and we only store in CouchDB, it'll be a mess to do.

If we want to do that, then the cozy-stack still need to checks the version and else, so I don't understand how we can simplify or remove this check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants