Wiki source code of Retention Policy

Version 3.1 by eMagiz on 2022/06/10 11:25

Hide last authors
Erik Bakker 2.1 1 {{container}}{{container layoutStyle="columns"}}(((
eMagiz 1.1 2
3 In this microlearning, we will dive a little bit deeper into the concept of the retention policy concerning Event Streaming. Retention policy determines when a message needs to be cleaned up and, if so, what will happen to the message.
4
Erik Bakker 2.1 5 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]].
eMagiz 1.1 6
7 * Last update: August 4th, 2021
8 * Required reading time: 4 minutes
9
10 == 1. Prerequisites ==
11
12 * Intermediate knowledge of the eMagiz platform
13
14 == 2. Key concepts ==
15
16 This microlearning centers on the retention policy for Event Streaming.
17
18 * The key aspects are:
19 * Retention Hours
20 * Retention Bytes
21 * Cleanup Policy
22 * These three items determine the retention policy
23
24
25
26 == 3. Event Streaming ==
27
28 In this microlearning, we will dive a little bit deeper into the concept of the retention policy concerning Event Streaming. Retention policy determines when a message needs to be cleaned up and, if so, what will happen to the message.
29
30 * The key aspects are:
31 * Retention Hours
32 * Retention Bytes
33 * Cleanup Policy
34 * These three items determine the retention policy
35
36 As we learned in the introductory [microlearning](crashcourse-eventstreaming-event-streaming-introduction.md), the topic holds a log with a sequence of messages. Based on several criteria, the broker decides when to remove messages from the back of the log to ensure that the topic stays within specific parameters. These parameters are the retention hours and the retention bytes. If you want to learn more about them specifically, please check out this [microlearning](crashcourse-eventstreaming-topic-and-topic-properties.md).
37
38 These parameters combined with the cleanup policy determine what happens with a message after it is expired. There are two options available:
39 delete
40 compact
41 The delete option is the default that eMagiz uses and advises. This option will, as the name suggests, delete all messages that are expired. There is an alternative approach called compact. This functionality will enable log compaction on the topic.
42
43 The three aspects combine to make up the retention policy. Defining the correct values for both the retention hours and the retention bytes is a science as a form of art. As you only have limited storage capacity available, the challenge becomes how much retention you reserve per topic. The more you assign, the less free storage capacity remains for other topics. As a consequence, you need to strive to optimize your retention policy per topic continually.
44
45
Erik Bakker 2.1 46
eMagiz 1.1 47 == 4. Assignment ==
48
49 Check out if you have a project in which the Event Streaming pattern is used. If so, check out the retention policy for several topics.
50
51 == 5. Key takeaways ==
52
53 * The key aspects are:
54 * Retention Hours
55 * Retention Bytes
56 * Cleanup Policy
57 * These three items determine the retention policy
58
59
60
61 == 6. Suggested Additional Readings ==
62
63 If you are interested in this topic, please read the help text eMagiz provides you.
64
65 == 7. Silent demonstration video ==
66
67 As this is a more theoretical microlearning, we have no video for this.
68
Erik Bakker 2.1 69 )))((({{toc/}}))){{/container}}{{/container}}