New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: LivechatInquiry out of DB Watcher #32358
base: develop
Are you sure you want to change the base?
refactor: LivechatInquiry out of DB Watcher #32358
Conversation
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #32358 +/- ##
===========================================
- Coverage 55.84% 55.53% -0.31%
===========================================
Files 2432 2384 -48
Lines 53478 52733 -745
Branches 10992 10809 -183
===========================================
- Hits 29864 29285 -579
+ Misses 20975 20846 -129
+ Partials 2639 2602 -37
Flags with carried forward coverage won't be shown. Click here to find out more. |
4970847
to
63fbc5a
Compare
63fbc5a
to
cfb85c4
Compare
As per the updates mentioned in PROJ-7, SCA-4 and ADR #74, this pull request focuses on relocating LivechatInquiry entity out of DB Watcher service.
Quick context to public readers
In essence, this modification empowers RocketChat's app to directly call listeners through the
api.broadcast
global function, eliminating the reliance on MongoDB Change Stream data propagationWhy is this beneficial? It provides better control over notifying users by enabling more precise use-case management. Unlike Change Streams, which notify every action on Mongo's documents and sometimes might result in unnecessary duplicate notifications. Moreover, it contributes to the future removal of the DB Watcher deployment, thereby optimizing resource utilization.
Proposed changes
Key changes include:
dbWatchersDisabled
flag.watch.inquiries
listener event, subject to thedbWatchersDisabled
flag.Updated use cases.
Steps to test or reproduce
DISABLE_DB_WATCHERS
flag set to true.${inquiry._id}
department/${inquiry.department}
public
All socket notifications come with the prefix
livechat-inquiry-queue-observer
.Further comments
To maintain consistency and avoid potential regressions, event names and signatures have been kept unchanged on both the client and app sides. This decision streamlines efforts and mitigates the risk of unintended consequences.