FAQ
Hello,



I would like to filter out a message if the FIX field 9101=N. I am able
to do this by creating a bean that does this and calling the bean from
the simple tag using the bean reference. See example below. I wondered
if it would be possible to do this without the java class.



<filter>

<simple>${bean:SecurityDefinitionFilter}</simple>





<filter>

<simple>${body}??????</simple>





Thanks for any help you can offer.



Regards




===============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
===============================================================================

Search Discussions

  • Claus Ibsen at Mar 15, 2012 at 8:35 am
    Hi

    It depends how complicated it is to get that information from FIX.
    What code do you do in your bean?

    The simple language have basic OGNL support, so you can invoke
    methods. But if you need a bit more, then you can use scripting
    languages such as groovy, java script etc.
    http://camel.apache.org/languages

    And they can be configured in the XML DSL.



    On Wed, Mar 14, 2012 at 10:24 PM, Gershaw, Geoffrey
    wrote:
    Hello,



    I would like to filter out a message if the FIX field 9101=N. I am able
    to do this by creating a bean that does this and calling the bean from
    the simple tag using the bean reference. See example below. I wondered
    if it would be possible to do this without the java class.



    <filter>

    <simple>${bean:SecurityDefinitionFilter}</simple>





    <filter>

    <simple>${body}??????</simple>





    Thanks for any help you can offer.



    Regards




    ===============================================================================
    Please access the attached hyperlink for an important electronic communications disclaimer:
    http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
    ===============================================================================


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/
  • Gershaw, Geoffrey at Mar 15, 2012 at 6:16 pm
    Thanks for you quick reply Claus.

    In my bean, I am retrieving a repeating group and checking that a fix tag on that group = "blah"

    SecurityDefinition.NoRelatedSym symbolGroup = new SecurityDefinition.NoRelatedSym();
    secDef.getGroup(1, symbolGroup);

    StringField instrTypeField = new StringField(9111);
    symbolGroup.getField(instrTypeField);
    instrType = instrTypeField.getValue();
    return instrType.equals("blah ")

    Think this is past simple's functionality. Not sure of how the other scripting languages would simplify this. I would rather not write a bean every time I want to filter a FIX msg. Any thoughts you have would be appreciated.

    Thanks,

    Geoff
    -----Original Message-----
    From: Claus Ibsen
    Sent: Thursday, March 15, 2012 4:35 AM
    To: users@camel.apache.org
    Subject: Re: QuickFIXJ Filtering

    Hi

    It depends how complicated it is to get that information from FIX.
    What code do you do in your bean?

    The simple language have basic OGNL support, so you can invoke
    methods. But if you need a bit more, then you can use scripting
    languages such as groovy, java script etc.
    http://camel.apache.org/languages

    And they can be configured in the XML DSL.



    On Wed, Mar 14, 2012 at 10:24 PM, Gershaw, Geoffrey
    wrote:
    Hello,



    I would like to filter out a message if the FIX field 9101=N. I am able
    to do this by creating a bean that does this and calling the bean from
    the simple tag using the bean reference. See example below. I wondered
    if it would be possible to do this without the java class.



    <filter>

    <simple>${bean:SecurityDefinitionFilter}</simple>





    <filter>

    <simple>${body}??????</simple>





    Thanks for any help you can offer.



    Regards




    ===============================================================================
    Please access the attached hyperlink for an important electronic communications disclaimer:
    http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
    ===============================================================================


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/

    ===============================================================================
    Please access the attached hyperlink for an important electronic communications disclaimer:
    http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
    ===============================================================================
  • Claus Ibsen at Mar 16, 2012 at 10:54 am

    On Thu, Mar 15, 2012 at 7:15 PM, Gershaw, Geoffrey wrote:
    Thanks for you quick reply Claus.

    In my bean, I am retrieving a repeating group and checking that a fix tag on that group = "blah"

    SecurityDefinition.NoRelatedSym symbolGroup = new SecurityDefinition.NoRelatedSym();
    secDef.getGroup(1, symbolGroup);

    StringField instrTypeField = new StringField(9111);
    symbolGroup.getField(instrTypeField);
    instrType = instrTypeField.getValue();
    return instrType.equals("blah ")

    Think this is past simple's functionality. Not sure of how the other scripting languages would simplify this. I would rather not write a bean every time I want to filter a FIX msg. Any thoughts you have would be appreciated.
    Yeah it seems a bit complicated. You could possible have a bean with
    static methods that returns the field value

    Where you enlist the bean as
    <bean id="fixStuff" class="com.foo.MyFixBean"/>

    And use a simple predicate, where you can pass in values in the method signature
    <simple>${bean:fixStuff?method=fooMethod(${body}, "911")} == "blah"</simple>

    And then have a method signature
    public String fooMethod(Object body, String code) {
    ...
    }




    Thanks,

    Geoff
    -----Original Message-----
    From: Claus Ibsen
    Sent: Thursday, March 15, 2012 4:35 AM
    To: users@camel.apache.org
    Subject: Re: QuickFIXJ Filtering

    Hi

    It depends how complicated it is to get that information from FIX.
    What code do you do in your bean?

    The simple language have basic OGNL support, so you can invoke
    methods. But if you need a bit more, then you can use scripting
    languages such as groovy, java script etc.
    http://camel.apache.org/languages

    And they can be configured in the XML DSL.



    On Wed, Mar 14, 2012 at 10:24 PM, Gershaw, Geoffrey
    wrote:
    Hello,



    I would like to filter out a message if the FIX field 9101=N. I am able
    to do this by creating a bean that does this and calling the bean from
    the simple tag using the bean reference. See example below. I wondered
    if it would be possible to do this without the java class.



    <filter>

    <simple>${bean:SecurityDefinitionFilter}</simple>





    <filter>

    <simple>${body}??????</simple>





    Thanks for any help you can offer.



    Regards




    ===============================================================================
    Please access the attached hyperlink for an important electronic communications disclaimer:
    http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
    ===============================================================================


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/

    ===============================================================================
    Please access the attached hyperlink for an important electronic communications disclaimer:
    http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
    ===============================================================================


    --
    Claus Ibsen
    -----------------
    CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedMar 14, '12 at 9:25p
activeMar 16, '12 at 10:54a
posts4
users2
websitecamel.apache.org

2 users in discussion

Gershaw, Geoffrey: 2 posts Claus Ibsen: 2 posts

People

Translate

site design / logo © 2021 Grokbase