Wiki source code of Design an Event Processor
Last modified by Martijn Woudstra on 2022/11/03 15:50
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{container}}{{container layoutStyle="columns"}}((( | ||
| 2 | In this microlearning, we will focus on the event processor in eMagiz. Particularly the part of designing an event processor | ||
| 3 | With the help of this event processor, you can easily transport, filter, and transform data between two topics. | ||
| 4 | |||
| 5 | Should you have any questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]]. | ||
| 6 | |||
| 7 | == 1. Prerequisites == | ||
| 8 | |||
| 9 | * Intermediate knowledge of the eMagiz platform | ||
| 10 | * An Event Streaming License | ||
| 11 | * Knowledge of the Event Streaming Pattern | ||
| 12 | * Followed the crash course on Event Streaming | ||
| 13 | |||
| 14 | == 2. Key concepts == | ||
| 15 | |||
| 16 | This microlearning centers around designing an event processor | ||
| 17 | By event processor we mean: A flow within eMagiz that consumes data from one topic and transports the data to another topic. In between, you have the option to filter or transform the data (i.e. event) | ||
| 18 | |||
| 19 | To create an event processor we need the following: | ||
| 20 | |||
| 21 | * An input topic designed in eMagiz | ||
| 22 | * An output topic designed in eMagiz | ||
| 23 | |||
| 24 | == 3. Design an Event Processor == | ||
| 25 | |||
| 26 | An Event processor is a flow within eMagiz that retrieves data from one topic (the so-called input topic) and transports the data to another topic (the so-called output topic). | ||
| 27 | During the transport of the data, you can transform the event or filter out events that don't fit your criteria. | ||
| 28 | |||
| 29 | In this microlearning, we will learn how you can design your event processor. In the microlearnings that will follow we will build on this knowledge. | ||
| 30 | |||
| 31 | === 3.1 Input and Output Topic === | ||
| 32 | |||
| 33 | The first step of setting up your event processor is determining which topics you want to transport the data to. | ||
| 34 | An Event processor needs an input and an output topic to function correctly. | ||
| 35 | When you have established what the input and output topic is you can determine whether these topics are already designed in eMagiz. | ||
| 36 | For this microlearning, we assume that the topics already exists | ||
| 37 | |||
| 38 | [[image:Main.Images.Microlearning.WebHome@intermediate-configuring-emagiz-event-streaming-design-an-event-processor--capture-view.png]] | ||
| 39 | |||
| 40 | Since we already have the input and output topics we can move to the Design phase of eMagiz. In this phase, you can design the event processor. | ||
| 41 | |||
| 42 | [[image:Main.Images.Microlearning.WebHome@intermediate-configuring-emagiz-event-streaming-design-an-event-processor--design-view.png]] | ||
| 43 | |||
| 44 | === 3.2 Link Input to Output via an Event Processor === | ||
| 45 | |||
| 46 | As you can see in this picture (and probably remember from one of our earlier microlearnings) there are no systems that produce data on the Output topic. | ||
| 47 | This is where eMagiz comes in. Via the event processor, you can configure that all data from the Input topic will be transported towards the output topic. | ||
| 48 | In other words, eMagiz will become the producer of data on the Output topic. | ||
| 49 | |||
| 50 | To design an event processor you simply navigate to one of the lines drawn that represent the input and the output topic and access the context menu via a right-mouse click. | ||
| 51 | |||
| 52 | [[image:Main.Images.Microlearning.WebHome@intermediate-configuring-emagiz-event-streaming-design-an-event-processor--design-add-processor-context-menu.png]] | ||
| 53 | |||
| 54 | When you select the option called Add processor you will see a pop-up similar to the one shown below. | ||
| 55 | Do notice that depending via which line you access the context menu what can be altered changes. When you select the line that has a consuming system you can select the input topic. | ||
| 56 | When you select the line that has a producing system you can select the output topic. | ||
| 57 | |||
| 58 | [[image:Main.Images.Microlearning.WebHome@intermediate-configuring-emagiz-event-streaming-design-an-event-processor--design-add-processor-pop-up.png]] | ||
| 59 | |||
| 60 | Select the correct topic and press Save. | ||
| 61 | |||
| 62 | [[image:Main.Images.Microlearning.WebHome@intermediate-configuring-emagiz-event-streaming-design-an-event-processor--design-add-processor-pop-up-filled-in.png]] | ||
| 63 | |||
| 64 | As a result, your Design overview will change to reflect the choices that you have made | ||
| 65 | |||
| 66 | [[image:Main.Images.Microlearning.WebHome@intermediate-configuring-emagiz-event-streaming-design-an-event-processor--design-view-event-processor.png]] | ||
| 67 | |||
| 68 | You have now successfully designed an event processor that is capable of transporting data from the Input Topic to the Output Topic. | ||
| 69 | |||
| 70 | === 3.3 Double Lane Consideration === | ||
| 71 | |||
| 72 | When running your Event Streaming processor(s) in a double lane setup you should be aware that both consumers will become part of the same consumer group and therefore the minimum number of partitions on the topics read by the event processor should be two. For an explanation on how consumers groups work please see this [[fundamental>>doc:Main.eMagiz Academy.Fundamentals.fundamental-event-streaming-introduction.WebHome||target="blank"]] | ||
| 73 | |||
| 74 | == 4. Assignment == | ||
| 75 | |||
| 76 | Design an Event processor between an input and output topic within your (Academy) project. | ||
| 77 | This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment. | ||
| 78 | |||
| 79 | == 5. Key takeaways == | ||
| 80 | |||
| 81 | * An event processor transports data between an input and an output topic | ||
| 82 | * In eMagiz, you can easily design an event processor by clicking on a line representing a topic in Design | ||
| 83 | |||
| 84 | == 6. Suggested Additional Readings == | ||
| 85 | |||
| 86 | If you are interested in this topic and want more information on it please read the release notes provided by eMagiz that accompany the eMagiz Mendix Connector version you have selected. | ||
| 87 | |||
| 88 | == 7. Silent demonstration video == | ||
| 89 | |||
| 90 | This video demonstrates how you could have handled the assignment and gives you some context on what you have just learned. Disclaimer, you only see the eMagiz part but if you follow the above steps you are good to go! | ||
| 91 | |||
| 92 | {{video attachment="intermediate-configuring-emagiz-event-streaming-design-an-event-processor.mp4" reference="Main.Videos.Microlearning.WebHome"/}} | ||
| 93 | )))((({{toc/}}))){{/container}}{{/container}} |