- Open the folder of the project.
- Open a terminal and run the following command to start kafka container :
docker-compose up -d
-
Use the
pwd
command in the terminal to get the current directory path and paste it into thefile.path
property in theapplication.properties
file. -
Open the
OfferServiceImpl
class and locate the@Qualifier
annotation.
- If you set the value to
"impl1"
, the app will use H2 database to persist data. - If you set the value to
"impl2"
, the app will throw an event to Kafka when an offer is created.