You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Gershaw, Geoffrey" <ge...@credit-suisse.com> on 2012/03/14 22:24:25 UTC

QuickFIXJ Filtering

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 
=============================================================================== 


Re: QuickFIXJ Filtering

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Mar 15, 2012 at 7:15 PM, Gershaw, Geoffrey
<ge...@credit-suisse.com> 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 [mailto:claus.ibsen@gmail.com]
> 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
> <ge...@credit-suisse.com> 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/

RE: QuickFIXJ Filtering

Posted by "Gershaw, Geoffrey" <ge...@credit-suisse.com>.
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 [mailto:claus.ibsen@gmail.com] 
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
<ge...@credit-suisse.com> 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 
=============================================================================== 


Re: QuickFIXJ Filtering

Posted by Claus Ibsen <cl...@gmail.com>.
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
<ge...@credit-suisse.com> 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/