Building Cross-Framework Messaging with Quarkus, Micronaut, and RabbitMQ
The JVM ecosystem offers a wide range of powerful frameworks, each with its own strengths and capabilities. In a modern distributed architecture, however, applications are not always built using the same framework. Services developed with frameworks such as Quarkus, Micronaut, and Spring Boot may need to communicate seamlessly as part of the same system. This guide demonstrates how RabbitMQ can enable cross-framework asynchronous communication between JVM applications. We will build two applications using different frameworks: a Quarkus application that publishes LeaveRequest messages and a Micronaut application that consumes and processes them. The first application, built with Quarkus, publishes a LeaveRequest object as a message to RabbitMQ. The second application, built with Micronaut, receives the LeaveRequest message and processes it according to the application's business logic. By the end of this guide, you will have a practical understanding of how two applications built with different Java frameworks can communicate asynchronously using RabbitMQ. Lets begin the journey To ensure that both applications use a consistent message contract, create a separate Gradle project named common. This project will contain the shared LeaveRequest model and can be referenced as a dependency by both the Quarkus and Micronaut applications. @Introspected @Serdeable public record LeaveRequest ( String personName , String personRole , String facilityName , String wardName , String shiftName , String leaveReason , String recipientName , String recipientEmail , String recipient , String subject ) {} The dependency on the common project will be dependencies { annotationProcessor ( "io.micronaut:micronaut-inject-java:5.1.12" ) implementation ( "io.micronaut.serde:micronaut-serde-jackson:3.1.1" ) } The @Introspected and @Serdeable annotations enable Micronaut to generate the metadata required for efficient introspection and serialization. Connecting Quarkus to RabbitMQ To connect th