Featured resource
2026 Tech Forecast
2026 Tech Forecast

Stay ahead of what’s next in tech with predictions from 1,500+ business leaders, insiders, and Pluralsight Authors.

Get these insights
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Core Tech
Labs

Guided: Implementing Event-Driven Communication in Quarkus

This Code Lab covers how to build resilient, decoupled microservices using event-driven patterns in Quarkus. You will learn to implement asynchronous messaging using the SmallRye Reactive Messaging framework, produce and consume events, and ensure reliability with built-in fault tolerance strategies.

Lab platform
Lab Info
Level
Beginner
Last updated
Dec 12, 2025
Duration
45m

Contact sales

By clicking submit, you agree to our Privacy Policy and Terms of Use, and consent to receive marketing emails from Pluralsight.
Table of Contents
  1. Challenge

    Introduction

    Welcome to this Code Lab on building event-driven microservices with Quarkus!

    In modern applications, services need to communicate in a way that is both efficient and resilient. Tightly coupling services with direct, synchronous calls can lead to fragile systems that are difficult to scale and maintain.

    Event-driven architecture solves this by decoupling services. Instead of calling each other directly, services communicate by producing and consuming events through a message broker. This allows for asynchronous communication, improving scalability and resilience.

    In this lab, you will build a two-service application:

    • An order-service that exposes a REST endpoint to create orders and publishes an OrderCreated event.
    • An inventory-service that listens for OrderCreated events and processes them.

    You will use Quarkus and the SmallRye Reactive Messaging framework to implement this pattern. You won't need any external message brokers like Kafka or RabbitMQ; you'll use the convenient in-memory connector provided by SmallRye, which is ideal for a lab environment.

    info > This lab experience was developed by the Pluralsight team using Forge, an internally developed AI tool utilizing Gemini technology. All sections were verified by human experts for accuracy prior to publication. For issue reporting, please contact us.

  2. Challenge

    Step 2: Configure the Order Service (Producer)

    First, you'll set up the order-service, which will act as your event producer. This involves defining the data structure for your event and configuring the messaging channel where events will be sent.

  3. Challenge

    Step 3: Implement Event Production Logic

    Now that the producer service is configured, implement the logic to generate and send events. You'll create a service bean to handle event emission and a REST endpoint to trigger it.

  4. Challenge

    Step 4: Configure the Inventory Service (Consumer)

    With the producer complete, it's time to build the consumer. You'll switch to the inventory-service module and set it up to listen for the events being produced by the order-service.

  5. Challenge

    Step 5: Implement Event Consumption and Fault Tolerance

    In this step, you will implement the core logic of the inventory-service. You'll create a consumer that processes incoming order events and add a fault tolerance mechanism to make your service more robust.

  6. Challenge

    Step 6: Running and Verifying the Application

    Congrats! You have built and configured both microservices! Now it's time to see them work together. You will run both services and send a request to the order-service to confirm that the inventory-service receives the event.

    To run the application and see the result, follow these steps:

    1. In the first terminal, run the combined-service:
      mvn quarkus:dev -pl combined-service
      
    2. In this second terminal, use curl to post a new order:
      curl -X POST -H "Content-Type: application/json" -d '{"orderId":"order-123","itemId":"item-456","quantity":5}' http://localhost:8080/orders
      
    3. Observe the output in the combined-service terminal. You should see a log line like Processing order: order-123, confirming that the event was produced, sent, received, and processed asynchronously!
About the author

Pluralsight Code Labs offer an opportunity to get hands-on learning in real-time. Be it a Challenge, Sandbox, or Guided Lab, these provide the real world experience needed to succeed in your development role.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight