1 00:00:01,050 --> 00:00:04,050 We've now got some publishers put together inside of our order service. 2 00:00:04,050 --> 00:00:08,820 And at this point time I'm really excited because we've got publishers available inside the order service 3 00:00:08,970 --> 00:00:11,520 and inside the ticket service. 4 00:00:11,520 --> 00:00:13,200 So here's what we're going to start to work on. 5 00:00:13,260 --> 00:00:17,500 We're going to start to put together some number of listeners in these two services. 6 00:00:17,520 --> 00:00:22,470 Remember that the goal of a listener is to process a number of incoming events inside of both these 7 00:00:22,470 --> 00:00:22,940 services. 8 00:00:22,950 --> 00:00:25,530 We have to create two different listeners. 9 00:00:25,530 --> 00:00:29,700 So you might recall seeing this diagram right here was a diagram of where all these different events 10 00:00:29,700 --> 00:00:34,260 are coming from and where they're going to go for the ticket created event. 11 00:00:34,270 --> 00:00:39,380 We need to make sure that the order service receives this event or it listens for ticket created. 12 00:00:39,490 --> 00:00:44,450 And I've got some notes on here about what that listener needs to do the order service also needs to 13 00:00:44,450 --> 00:00:46,360 listen for ticket updated. 14 00:00:46,610 --> 00:00:51,780 That's two listeners at least we have to build inside order service then inside the ticket service. 15 00:00:51,810 --> 00:00:59,030 We need to make sure that thing listens for the order created event and for the order canceled event. 16 00:00:59,140 --> 00:01:04,780 We're going to first begin working on our listeners or creating a ticket and updating a ticket. 17 00:01:04,780 --> 00:01:08,010 So these are both listeners we're going to put together inside of our orders service. 18 00:01:08,830 --> 00:01:12,790 And the reason I'm so excited about this is that this is where we're going to start to see some crazy 19 00:01:12,790 --> 00:01:18,430 concurrency issues start to come up and we're going to figure out how to solve these concurrency issues. 20 00:01:18,430 --> 00:01:24,310 You might recall discussing this diagram a little bit ago a couple hours ago inside the course where 21 00:01:24,310 --> 00:01:30,220 we discussed having some of these events of ticket created and ticket updated come into our application 22 00:01:30,220 --> 00:01:35,230 in some weird order and we saw that if they get processed in a weird order we could end up with some 23 00:01:35,230 --> 00:01:37,030 super invalid data. 24 00:01:37,150 --> 00:01:42,910 So we eventually came up with a solution of using this version field to somehow track in order these 25 00:01:42,910 --> 00:01:44,940 different events inside of our app. 26 00:01:44,950 --> 00:01:49,330 So this is where we're going to start to go back to all this concurrency stuff and implement this versioning 27 00:01:49,360 --> 00:01:49,750 thing. 28 00:01:50,560 --> 00:01:54,730 So again the first stuff we're gonna put together we're going to get a listener put together or ticket 29 00:01:54,730 --> 00:01:57,730 created and ticket updated inside of our order service. 30 00:01:57,730 --> 00:02:02,500 And as soon as we do that so we're going to start to see these version numbers start to become really 31 00:02:02,500 --> 00:02:03,820 important. 32 00:02:03,850 --> 00:02:04,150 All right. 33 00:02:04,150 --> 00:02:07,330 Now we got a little preview of what we're gonna be focusing on. 34 00:02:07,330 --> 00:02:08,530 Let's take a quick pause right here. 35 00:02:08,530 --> 00:02:12,250 We're going to get a quick reminder on how we create a listener in the next video.