July 2021
Intermediate to advanced
176 pages
4h 14m
English
Now that we have the tickets project set up, we are ready to start writing some code. Once a message comes from the message broker, we want to use it to create a ticket in the database for the customer and send a confirmation email to them.
To accomplish this, we are going to use the Broadway behaviour to configure and start the data-ingestion pipeline. There are four callbacks available for us to implement:
In this section, we’ll focus on the first three callbacks in the list. Don’t worry, we’re going to cover handle_batch/4 soon in Batching Messages.
First, create a new file bookings_pipeline.ex in the lib folder. Then define the module BookingsPipeline ...
Read now
Unlock full access