<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>messaging</artifactId>
</dependency>
Messaging
The Messaging fraction brings support for JMS to your application. Currently, the messaging capability does not span across multiple independent WildFly Swarm-based services, but is only available within a single service.
The WildFly Swarm messaging broker is based upon ActiveMQ.
Configuration
To enable messaging for your application, you need to include the following dependency:
Additionally, you must configure some destinations for the messaging broker to be useful. This is done through your main(…)
function.
swarm.subsystem(new MessagingFraction()
.server(
new MessagingServer()
.enableInVMConnector()
.topic("my-topic")
.queue("my-queue")
)
);
TODO: This is painful. We must improve that API.