Skip to content

Common contact: endpoint to republish all contacts #1024

Description

@chibenwa

Why ?

https://github.com/linagora/twake-workplace-private/blob/main/documentation/docs/adrs/adr-043.md defines the Common Contacts bridge: the side service consumes Sabre contact notifications and republishes them as JSContact events on the twake:contacts:common fanout exchange (implemented in #1013), and ingests collected contacts from twake:contacts:collected (#1017).

The bridge is purely incremental: a consumer only receives what happens after it subscribes. This leaves two unsolved cases:

  • Bootstrap - when Chat or Drive plugs in for the first time, its contact database is empty and there is no way to obtain the initial state.
  • Repair - a consumer that lost messages (extended downtime, dead-lettered batch, bug in its own projection) has no way to resynchronize.

ADR 043 therefore mandates that the side service provides a republication route.

What ?

POST /contacts?action=republish

Shedules a task

Also have a per domain / per user version.

POST /users/btellier@linagora.com/contacts?action=republish // user contats
POST /domains/linagora.com/contacts?action=republish // domain contacts and domain users contacts
POST /domains/linagora.com/contacts?action=republish&scope=domain // only domain contacts not user contacts

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions