activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CurtisRopp <cr...@teamropp.com>
Subject Do VirtualTopic consumers support wildcards
Date Tue, 08 Feb 2011 00:52:50 GMT

I wanted to put together a configuration for virtual topics that using the
filtering option of camel would allow me to put matching messages in
different topics and if you wanted all messages you could then use wild
cards to consume. 

Example
VirtualTopic.test.transactions.api1
VirtualTopic.test.transactions.api2
VirtualTopic.test.transactions.api2
VirtualTopic.test.transactions -- not api 1 2 3
VirtualTopic.test -- not a transaction 

Then I could setup a consumer to point to 
    queue:Consumer.Mine.VirtualTopic.test> to consume all 
    queue:Consumer.Mine.VirtualTopic.test.transactions.* to consume api's
1,2,3 

So far this does not appear to be working and I will dig in a little further
before changing the way I filter.

Any help would be appreciated

------ and for the camel -------
    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
        <route id="virtual">
            <from uri="activemq:queue:Transaction"/>
            <multicast>
                <log message="${body}" logName="message"/>
                <to uri="activemq:topic:TransactionTopic"/>
                <choice>
                    <when>
                        <!-- If it's a replication check -->
                        <method bean="repCheckMsgTypeFilter"/>
                        <choice>
                            <when>
                                <!-- if it's from API 1 -->
                                <method bean="includeWhenfromApi1"/>
                                <to
uri="activemq:topic:VirtualTopic.TransactionTopic.RepCheckTransaction.API1"/>
                            </when>
                            <otherwise>
                                <!-- Else it's still a repcheck but not from
OLTP -->
                                <to
uri="activemq:topic:VirtualTopic.TransactionTopic.RepCheckTransaction"/>
                            </otherwise>
                        </choice>
                    </when>
                    <otherwise>
                        <!-- Else it's not a repcheck -->
                        <to
uri="activemq:topic:VirtualTopic.TransactionTopic"/>
                    </otherwise>
                </choice>
            </multicast>
        </route>
    </camelContext>

-- 
View this message in context: http://activemq.2283324.n4.nabble.com/Do-VirtualTopic-consumers-support-wildcards-tp3265494p3265494.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message