Question

I have been looking at the org.hornetq.core.server package which seems to have the most interesting low level APIS relating to managing the server.

The server session has a few methods labelled something Queue but none include Topic ...

ServerSession

void createQueue(SimpleString address,
                          SimpleString name,
                          SimpleString filterString,
                          boolean temporary,
                          boolean durable) throws Exception;

   void deleteQueue(SimpleString name) throws Exception

interface QueueFactory

Queue createQueue(long persistenceID,
                 final SimpleString address,
                 SimpleString name,
                 Filter filter,
                 boolean durable,
                 boolean temporary);

However i could not figure out how to create a topic. Am i missing something is a JMS topic implemented as a queue ?

Was it helpful?

Solution

The core API does not know the concept of a Topic as it is used in JMS, it only knows queues and adresses. In the documentation it says:

*For example, a JMS topic would be implemented by a single address to which many queues are bound. Each queue represents a subscription of the topic. A JMS Queue would be implemented as a single address to which one queue is bound - that queue represents the JMS queue.*

You could implement it with the core API the same way or just use JMS :-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top