The native RabbitMQ Grails plugin provides easily consumable messaging functionality.
Add to BuildConfig:
The RabbitMQ Native plugin enables integration of Grails applications with the RabbitMQ broker using the Java library provided by RabbitMQ.This plugin takes a lot of its inspirations from the official Grails RabbitMQ plugin, but it is not a fork of that plugin and it has some major differences and a lot of added functionality.The major features are listed below:
- Ability to configure queues and exchanges from the application config.
- Ability to bind queues to exchanges without also defining the exchange.
- New artefact type for handling incoming messages called "consumers".
- Consumers can define message handlers for specific data types, along with 3 general types of handler method parameter lists.
- Consumers support automatic RPC behavior by passing along the return value of a consumer to the client.
- Ability to add custom message converters for automatic type conversion. Has 4 built-ins: Integer, List, Map, and String.
- Support for subscribing directly to exchanges in consumers for all exchange types.
- Consumers are started as late as possible to ensure the application is ready to handle incoming messages.