I am looking for some advice as to functionality in HornetQ for the following scenario.
I have 2 stand alone HornetQ 2.2.14.Final servers (A & B) which each have a cluster connection defined using a static connector pointed to the other server.
Also defined on each server are a JMS Queue (jms.queue.queueA) and a JMS Topic (jms.topic.clustered.topicA). The cluster connections are defined so as to include the topic as a clustered address but not the queue.
Finally a divert is defined on each server such that some of the messages delivered to jms.queue.queueA are diverted into the local jms.topic.clustered.topicA.
I have removed the filter as it is not relevant.
I have run various test against this configuration and the following scenarios appear to be playing out.
- If I deliver the message to queueA then the divert copies the message to the local topicA where it is consumed by an appropriate subscriber of the local topicA. No messages are received by subscribers of the remote topicA.
- If I deliver the message directly to topicA then messages are consumed by subscribers of both the local and remote topic A. This demonstrates that the cluster / topic are configured properly.
So my questions are:
- Is HornetQ designed such that messages diverted from one address to another clustered address are not then passed to remote nodes in the cluster?
- Assuming HornetQ is not designed as specified in (1), are there any examples which I can refer to in trying to configure my own servers to do this?
- If this is by design are there any other options which could allow some of the messages delivered to a queue to be redistributed to multiple subscribers across a cluster?
I appreciate you are all very busy, so I offer my thanks in advance for any guidance you can provide.