[ 
https://issues.apache.org/jira/browse/ARTEMIS-2134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram closed ARTEMIS-2134.
-----------------------------------
    Resolution: Duplicate

> Define divert using an xpath filter on XML Message Content
> ----------------------------------------------------------
>
>                 Key: ARTEMIS-2134
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2134
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.6.3
>            Reporter: Michael Frank
>            Priority: Major
>              Labels: newbie
>
> I'm not sure whether to classify this as a bug or an improvment so please 
> reassign at will.
> Discussion can also be found here: 
> [http://mail-archives.apache.org/mod_mbox/activemq-users/201810.mbox/browser]
> I'm using version 2.6.3 of Artemis and trying to set up a divert from one 
> queue to another using an xpath filter on the message content. Unfortunately 
> this doesn't work as my XML Test messages are not getting diverted but stay 
> in the incoming queue.
> So, Justin Bertram pointed me to 
> [https://github.com/apache/activemq-artemis/blob/master/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java#L210]
>  writing this feature is not implemented yet.
> Unfortunately this also fails silently (no log message, no exception) and is 
> not documented anywhere so it was a real headache to debug.
> Is there another way to do it? If not, is this a bug or a 
> Feature/Improvement? (I think this was already working in AktiveMQ 
> 5.something)
> My adresses in broker.xml look like this     
> {code:java}
> <addresses>          
> ...
> DLQ and ExpiryQueue
> ...
> <address name="Incoming">            
>   <anycast>                
>     <queue name="Incoming" />            
>   </anycast>          
> </address>        
> <address name="XMLMessages">             
>   <anycast>               
>     <queue name="XMLMessages" />            
>   </anycast>         
> </address>        
> </addresses> 
> {code}
> My divert:
> {code:java}
> <diverts>   
>   <divert name="xmldivert"> 
>     <address>Incoming</address> 
>     <forwarding-address>XMLMessages</forwarding-address>                     
>     <filter string="XPATH '//ContractedTimeTableMsg/Message'"/>      
>     <exclusive>true</exclusive>   
>   </divert>         
> </diverts>
> {code}
> My XML
> {code:java}
> <ContractedTimeTableMsg> 
>   <Message type="123"> 
>   </Message>
> </ContractedTimeTableMsg> 
> {code}
> I'm using Java 8 and a standalone installation of Artemis. 
>  Xalan is on the classpath, I tried version Xalan 2.6 and v2.7.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to