Wiki source code of intermediate-key-concepts-emagiz-event-streaming-retention-policy
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{html wiki="true"}} | ||
2 | <div class="ez-academy"> | ||
3 | <div class="ez-academy_body"> | ||
4 | |||
5 | <div class="doc"> | ||
6 | |||
7 | |||
8 | |||
9 | = Retention Policy = | ||
10 | |||
11 | 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. | ||
12 | |||
13 | Should you have any questions, please get in touch with academy@emagiz.com. | ||
14 | |||
15 | * Last update: August 4th, 2021 | ||
16 | * Required reading time: 4 minutes | ||
17 | |||
18 | == 1. Prerequisites == | ||
19 | |||
20 | * Intermediate knowledge of the eMagiz platform | ||
21 | |||
22 | == 2. Key concepts == | ||
23 | |||
24 | This microlearning centers on the retention policy for Event Streaming. | ||
25 | |||
26 | * The key aspects are: | ||
27 | * Retention Hours | ||
28 | * Retention Bytes | ||
29 | * Cleanup Policy | ||
30 | * These three items determine the retention policy | ||
31 | |||
32 | |||
33 | |||
34 | == 3. Event Streaming == | ||
35 | |||
36 | 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. | ||
37 | |||
38 | * The key aspects are: | ||
39 | * Retention Hours | ||
40 | * Retention Bytes | ||
41 | * Cleanup Policy | ||
42 | * These three items determine the retention policy | ||
43 | |||
44 | 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). | ||
45 | |||
46 | These parameters combined with the cleanup policy determine what happens with a message after it is expired. There are two options available: | ||
47 | delete | ||
48 | compact | ||
49 | 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. | ||
50 | |||
51 | 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. | ||
52 | |||
53 | ===== Practice ===== | ||
54 | |||
55 | == 4. Assignment == | ||
56 | |||
57 | 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. | ||
58 | |||
59 | == 5. Key takeaways == | ||
60 | |||
61 | * The key aspects are: | ||
62 | * Retention Hours | ||
63 | * Retention Bytes | ||
64 | * Cleanup Policy | ||
65 | * These three items determine the retention policy | ||
66 | |||
67 | |||
68 | |||
69 | == 6. Suggested Additional Readings == | ||
70 | |||
71 | If you are interested in this topic, please read the help text eMagiz provides you. | ||
72 | |||
73 | == 7. Silent demonstration video == | ||
74 | |||
75 | As this is a more theoretical microlearning, we have no video for this. | ||
76 | |||
77 | </div> | ||
78 | |||
79 | </div> | ||
80 | </div> | ||
81 | |||
82 | {{/html}} |