Here is a primitive example of embedded Artemis broker sending and receiving messages using Point-to-Point send/receive. This example is self-contained and requires no further configuration with XML or any other external file.
In this example a new core queue is created under this broker using these lines:
QueueConfiguration coreQueueConfiguration = new QueueConfiguration(QUEUE_NAME);
coreQueueConfiguration.setAddress(QUEUE_NAME)
.setName(QUEUE_NAME)
.setDurable(true)
.setRoutingType(RoutingType.ANYCAST);
configuration.addQueueConfiguration(coreQueueConfiguration);
Configuration
is a class used by the broker to configure itself.
The class org.apache.activemq.artemis.api.core.QueueConfiguration
is provided by the Artemis project in order to create queues.
However, I was unable to find any example of how to programmatically (no XML or any other files) to create/delete and otherwise manage JMS Topics in an embedded Artemis broker.
Question: How can I programmatically manage Artemis topics?