messaging/index
Overview
Module
- package:
org.eclipse.dirigible.sdk.messaging - source: messaging/
This module is the platform messaging surface of the Eclipse Dirigible Java SDK. It exposes the runtime's ActiveMQ broker - the one embedded in every Dirigible runtime, or an external broker when the deployment configures one - letting Java code publish to and consume from JMS-style queues (point-to-point) and topics (publish/subscribe) without any client-side broker plumbing.
Two consumption styles are supported. For long-running, always-on listeners the platform manages the consumer thread, reconnects, and dispatch - a @Component either annotates a void m(String) method with @Listener or implements the self-describing MessageHandler interface, and the runtime wires it up at startup and on hot-reload. For script-style or pull-based code that processes a single message and exits, the Consumer facade offers a blocking receiveFromQueue / receiveFromTopic with a millisecond timeout. Every component running on the platform - in any language - targets the same broker, so producers and listeners interoperate transparently regardless of where the message originates.
The main components of this module are:
Producer- sends a message to a queue or topic on the platform's ActiveMQ broker.Consumer- synchronously pulls a single message from a queue or topic with a millisecond timeout.- Decorators - used to declare always-on listeners:
@Listener- method-level annotation marking avoid m(String)method of a@Componentas a listenerMessageHandler- self-describing interface; a@Componentimplementing it is itself the listenerListenerKind- enum selectingQUEUEorTOPICsemantics for the listener