Version 6

    JBossESB - JBossESBEIP - Message Filter

    -


     

    Pattern Description

     

     

    A Message Filter inspects the content of a message and based on it's findings it can route the message to zero or

    more destinations. If none of the rules fires (no destinations found) then this means that this message filtered.

     

    Implementation

     

    The Message Filter is based on the Content-Based Router, but it allows the filtering of

    messages. By default the Message Filter uses JBossRules.

     

    Configuration

     

    We have a standard action called: org.jboss.soa.esb.actions.MessageFilter. The configuration of the action looks like:

     

    ...
    <action class="org.jboss.soa.esb.actions.MessageFilter" name="MessageFilter">
        <property name="ruleSet" value="MyESBRules-XPath.drl"></property>
        <property name="ruleLanguage" value="XPathLanguage.dsl"></property>
        <property name="ruleReload" value="true"></property>
        <property name="destinations">
            <route-to destination-name="express" service-category="ExpressShipping" service-name="ExpressShippingService"></route-to>
            <route-to destination-name="normal" service-category="NormalShipping" service-name="NormalShippingService"></route-to>
        </property>
    </action>
    ...
    

    Attribute

    Required

    Description

    ruleSet

    yes

    Reference to the rule set that will be used

    ruleLanguage

    no

    Reference to the Domain Specific Languange, can be XPathLanguage.dsl or your own custom language

    ruleReload

    no

    false by default, if set to true it will hot-deploy updated rules.

    destinations

    yes

    The name should be referenced in the ruleSet, while the service-category and service-name are used to lookup the right EPR in the registry.

     

    More information