From 0ad2c9f5dda1828463ad4212d4d23bc64f9b990a Mon Sep 17 00:00:00 2001 From: Bruno Bandeira Date: Thu, 2 Mar 2023 12:17:48 +0000 Subject: [PATCH] adding explanation about retention values --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 28f5e69..00f1a62 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,17 @@ memphis.types.Retention.BYTES Means that after max amount of saved bytes (set in retention value), the oldest messages will be deleted + +### Retention Values + +The `retention values` are directly related to the `retention types` mentioned above, where the values vary according to the type of retention chosen. + +All retention values are of type `int` but with different representations as follows: + +`memphis.types.Retention.MAX_MESSAGE_AGE_SECONDS` is represented **in seconds**, `memphis.types.Retention.MESSAGES` in a **number of messages** and finally `memphis.types.Retention.BYTES` in a **number of bytes**. + +After these limits are reached oldest messages will be deleted. + ### Storage types Memphis currently supports the following types of messages storage: