Process Ticketing Events
Create a new mix project for a legacy ticket booking system and install some dependencies in it.
Ticketing events
We will build an application that processes event messages sent by a legacy ticket booking system. Let’s call our project tickets
. The legacy system publishes those events to a RabbitMQ message broker. We’ll use the messages to perform actions such as creating the ticket in the database and sending an email notification to the customer.
Create a new mix
project
Our first task is to set up the project and ensure we have everything installed to test new features locally. We’ve already installed it for you on our platform.
We use the following command to create the project tickets:
mix new tickets --sup
Dependencies
We need to add broadway
as a dependency. We also need the broadway_rabbitmq
producer, which is published as a separate package:
Get hands-on with 1300+ tech skills courses.