You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Eibwen <gw...@sedonatek.com> on 2010/11/30 01:26:11 UTC
VirtualDestinations FilteredDestination Forward some leave others
Here is what i would like to do, but it does not work. Is there any way to
accomplish this?
1. A mirror queue that would get a copy of every message that comes in
--The mirror topic isn't needed by my program if i can get a mirrored queue
setup
2. Move messages to a different queue if they match certain selectors
3. Leave any messages that don't match in the queue
Here is as close as I've gotten so far:
<destinationInterceptors>
<!-- Setup mirror topic for each Queue, copying the messages there -->
<mirroredQueue copyMessage="true" postfix=".qmirror" prefix=""/>
<virtualDestinationInterceptor>
<virtualDestinations>
<compositeTopic name="DataQueue.qmirror" forwardOnly="false">
<forwardTo>
<!-- Forward a copy of all messages to a Monitor queue so we can
more easily detect any errors -->
<queue physicalName="DataMonitor" />
</forwardTo>
</compositeTopic>
<compositeQueue name="DataQueue">
<forwardTo>
<!-- Move (not copy) some types to their own queues -->
<filteredDestination selector="TypeID = 6"
queue="specialTypeData"/>
<filteredDestination selector="TypeID = 7"
queue="anotherSpecialTypeData"/>
<!-- WANT to leave all others in this queue -->
</forwardTo>
</compositeQueue>
</virtualDestinations>
</virtualDestinationInterceptor>
</destinationInterceptors>
1. Works (directs to the Topic mirror, then catches that and puts a copy
into the QueueMirror)
2. Works: Moves a copy into the special Queues
3. Fails: ignores any messages that don't match the selectors
[When forwardOnly="false" is on the compositeQueue]
2. Fails: it puts a copy there and leaves a copy
3. Works
Is this the sort of thing that Camel is for? I haven't really looked into
that.
How would that effect performance?
--
View this message in context: http://activemq.2283324.n4.nabble.com/VirtualDestinations-FilteredDestination-Forward-some-leave-others-tp3064684p3064684.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.