You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by johgre <jo...@gmail.com> on 2018/04/12 20:43:53 UTC

VirtualTopic Consumers in NOB

Hi!

I've got a VirtualTopic with configuration selectorAware=true. I've realized
that you're basically forced to use the virtualSelectorCacheBrokerPlugin to
avoid getting offline consumers missing messages. I'm using a network of
brokers setup, with two nodes. The plugin only has support for file based
cache, and I suspect this wont work since both brokers will have its own
cache file. 

So, configuring a shared san made things better, but with a very strange
behaviour. The scenario is:

1. create the VirtualTopic
2. register a couple of consumer queues with different selectors, to the
VirtualTopic
3. post message to the VirtualTopic

Looking in the console some queues actually get the correct filtered
messages, while some other queues get all messages, without the filter being
applied. It's really random behaviour and I can't see any patterns.

Anybody experienced this? Is the plugin actually supposed to work in a nob
setup?

Br,
John



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: VirtualTopic Consumers in NOB

Posted by johgre <jo...@gmail.com>.
After some more digging it seem to be the failover transport that might be
the culprit. When posting a msg directly to one node

    tcp://server_1:61616

the filter is applied correctly. But using the failover transport when
posting the msg

   
failover:(tcp://server_1:61616,tcp://server_2:61616)?initialReconnectDelay=100

results in the msg being forwarded from the VirtualTopic to the Queue, with
the selector *only* applied randomly.

Don't understand how the transport can have such an impact on the delivery
of msg to correct queues?

The NOB config is according to:

    <networkConnectors>
        <networkConnector name="a-2"
uri="masterslave:(tcp://server_2:61616,tcp://localhost:61626)"/>
    </networkConnectors>

and correspondingly on the other node. So, in addition it's a
master/slave-setup. The setup seem to work fine, but during the tests the
slaves have been shut down. Creating a Queue (tied to the VirtualTopic) on
one node, automatically gets created on the other node.

VirtualTopic config:

    <virtualTopic name="VirtualTopic.Customers" prefix="*."
selectorAware="true"/>

In addition the virtualSelectorCacheBrokerPlugin is used, as mentioned.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html