We're going to start working on our ticket service again very shortly.
But before we do just a quick reminder if we go back over to our terminal right now and do a cube CDL
get pods we will see that we've got our Nats deployment or the Nats pod running right there.
Now we've been running a lot of test code and we've been emitting a ton of events over to that Nats
deployment that probably have a lot of trash data inside them.
So we had a ton of events like for me I think I had at least 90 all concerned with that ticket update
events or the ticket Create Event whichever it was and chances are we might have been emitting some
data that wasn't really valid.
I know for certain of we had an idea inside that ticket create event of like one two 3 and that is definitely
not a valid ticket I.D. so it might make a lot of sense for us to restart this Nat spot right here which
will cause all the events that we have already emitted to be dumped.
Remember that Nats by default stores all these events in memory.
So if we just restart the thing all the events we've emitted so far get completely dumped and we won't
have to worry about consuming those kind of non valid events.
Once we start to handle incoming ticket created events where once we create a real publisher inside
of one of our services.
Long story short let's just restart that thing so I to find a listing I'm going to copy the name and
I'll do a cube Seitel delete pod and then put in the name that's going to delete the pod.
The deployment is going to automatically detect that the pod has been deleted and start up a new version.
So if I do another get pods.
There we go.
There's a brand new pod so because we restart the pod Nats was clearly restarted.
We don't have any of the events that we previously had emitted.
And so if we start to connect with some new service or something like that we're not going to get a
bunch of trash data along that subject or that channel of ticket colon created.
Now of course moving forward in the course at any point time if you are feeling like your Nats deployment
has a ton of trash data inside of it you just will repeat these same steps.
You'll do a delete pod then just verify that a new one was created by data points.
That's good another quick pause work on tickets in just a moment.