Read receipts allow users to confirm that their message was viewed. To enable this feature in your workspace, go to Manage
> Workspace > Settings > Message. On the Message settings page, go to the Read receipts tab and update the following settings:
Field | Description |
|---|---|
Show Read Receipts |
|
Detailed Read Receipts |
The following screenshot shows an example:
|
Enable Read Receipts Archive | By default, all read receipts remain in hot storage, consuming database capacity. Enabling the read receipts archive setting automatically moves older read receipts to cold storage after a specified retention period. Cold storage refers to a data collection with less access within the same database. With this archival feature, the load on the principal database collection is reduced. The Rocket.Chat server fetches information from cold storage when it cannot find the relevant data for messages.
|
Archive Retention Days | Enter the number of days to keep read receipts in hot storage before archiving to cold storage. For example, |
Archive Cron Schedule | Enter a cron expression to schedule when archiving runs. The default |
Archive Batch Size | Enter the number of read receipts to process per batch. For example, |
Once these settings are saved, the read receipts are immediately available in rooms.
Read receipts management for archival
Once the read receipts archival setting is enabled, all the receipts up to that time are migrated to a new collection (cold storage). This process can take a lot of time for large volumes of read receipts data. So, before enabling this setting, you can either delete the existing data or move the records in the database.
Option 1: Delete all existing read receipts (clean up) if you don't need historical read receipts and want a fresh start. Use the following command:
db.rocketchat_read_receipts.deleteMany({})Then enable the read receipts archive setting in the workspace.
Option 2: Migrate existing read receipts to cold storage manually if you want to preserve the historical data in the archive collection before enabling the setting. Follow these steps:
Copy all receipts to the archive collection using the following command:
db.rocketchat_read_receipts.aggregate([{ $merge: { into: "rocketchat_read_receipts_archive", whenMatched: "keepExisting" } }])Flag all messages so the system reads from the archive:
db.rocketchat_message.updateMany({}, { $set: { receiptsArchived: true } })Remove receipts from the hot collection:
db.rocketchat_read_receipts.deleteMany({})Now, enable the read receipts archive setting in the workspace.
For large datasets, consider running these commands during a maintenance window.
.png)