activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hassen Bennour <bennour.has...@gmail.com>
Subject Re: Help with Camel Config routing using a custom ActiveMQ Message Property
Date Thu, 23 Jun 2016 14:13:56 GMT
Hello,

You can route messages following messages properties with filtered
destinations  http://activemq.apache.org/virtual-destinations.html
or camel  http://activemq.apache.org/sample-camel-routes.html
http://camel.apache.org/message-filter.html

to trash a message i think you can route it to DLQ or another "trash queue"
or simply if it not correspond to any filtered Destination selector or
route it will not been forwarded, loosed.

for example :
<destinationInterceptors>
<virtualDestinationInterceptor>
<virtualDestinations>
<compositeTopic  name="TOPIC">
<forwardTo>
* <!-- 1. all messages will be duplicated to topic TOPIC_LOGS -->*
<topic physicalName="TOPIC_LOGS" />
* <!-- 2. all messages with message property clientID = 'activemq'  will be
duplicated to topic ACTIVEMQ -->*
<filteredDestination selector="clientID = 'activemq'" topic="ACTIVEMQ" />
</forwardTo>
</compositeTopic >
</virtualDestinations>
</virtualDestinationInterceptor>
</destinationInterceptors>

if you remove the filter 1 and a if a message dont have a *clientID =
'activemq' * it will be ignored.



Kind regards.

*BENNOUR HASSEN*

*SOA **Architect **/ **Java **Software Engineer*

2016-06-23 14:47 GMT+02:00 daelliott <my_forum@outlook.com>:

> I've taken over a project in which everyone that knows anything is gone.
> I'm new to ActiveMQ and have never used Camel before.
> I'm trying to do content message routing and have a sample of what I'm
> attempting to do but have a couple of questions.
>
> * How to access a custom ActiveMQ message property.
>    Is what I have below correct?
>
> * How to trash a message  i.e. send to /dev/null
>
> This is what I have after going through all the documentation that I could
> find.
> Any help is GREATLY appreciated.
>
>
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Help-with-Camel-Config-routing-using-a-custom-ActiveMQ-Message-Property-tp4713278.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message