I only implemented repeating groups in the FIX 4.4 library. I never had a need for it in the 4.0 & 4.2 libraries. The concepts to implement repeating groups are applicable to those libraries but I never had the time to implement them.
Another option would be to use the base FIX library that puts all those fields in a FieldCollection object. This gives you flexibility to iterate over all fields and build your own lists of repeating groups.
Hope this helps...
Charles Easton
East Tech Incorporated
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are right. After take a 2nd look I only implemented the build side. So it knows how to build a FIX message with repeating groups but doesn't know how to parse them.
Since the parse method won't actually do anything with repeating tags it's treated as a custom tag and goes into the FieldCollection. You can either try to access the field there or make updates to the Helper class parse methods.
Sorry for leaving it in a half finished state...
Charles Easton
East Tech Incorporated
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay. I thought that was the case. I wanted to make sure I didn't have something missing from source.
-jd-
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
-
2009-06-19
Hi Charles,
How is it there was never a need to parse repeating groups as Quotes often come with repeating groups? I find myself in a situation of committing to porting a project to your library and now encountering this dilemma. For FX, Currenex is FIX 4.2 and often repeating Groups are used. I prefer using 100% managed code than QuickFix so hoping I can get a solution. I suppose there is a solution with customizing the parser engine but I'm hoping there is an easier solution based on what you already have there. Any comments/advice appreciated.
Thanks
Luke
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I never finished all the FIX 4.2 messages. It probably wouldn't take long for me to implement the messages you need, even if they have repeating groups, but then you would have to integrate with my new release. Since this is open source I can not commit to a date but I'm willing to work on it since it's not finished as was meant to be finished.
What messages would you want to too quickly?
Charles Easton
East Tech Incorporated
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
-
2009-06-22
Hi Charles,
Thanks so much for the quick response. The main Message type I need to implement is MarketDataSnapshotFullRefresh ( "W" ) for FIX 4.4 as well as FIX 4.2.
I don't seem to have figured out how to use this message type in FIX 4.4 either. Perhaps if I am able to get FIX 4.4 working I will be able to apply that to the FIX 4.2 message types. Here is a brief description of how I am attempting to implement the library.
I connect and subscribe to the Received/MessageEventHandler event of the SocketEngine class. Then I try to caste the message type IMessage to the type of message it is. My code looks like this:
void engineConnect_Received(IEngine engine, IMessage message)
{
if (message.MsgType == "W")
{
//one attempt
FIX4NET.FIX.FIX_4_4.MarketDataSnapshotFullRefresh ms = (FIX4NET.FIX.FIX_4_4.MarketDataSnapshotFullRefresh)message;
In both cases I receive the exception message: System.InvalidCastException: Unable to cast object of type 'FIX4NET.FIX.Message' to type 'FIX4NET.FIX.FIX_4_4.MarketDataSnapshotFullRefresh'
I've looked into the code but don't really seem to be able to see where it works in this case of casting or parsing these message types.
Any advice/help appreciated.
Thanks,
Luke
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Make sure you initialize the SocketEngine with the FIX 4.4 MessageFactoryFIX.
SocketEngine engine = new SocketEngine();
engine.MessageFactory = new FIX4NET.FIX.FIX_4_4.MessageFactoryFIX();
This is how FIX4NET creates message objects from the raw FIX message. Depending on what type of factory you give the engine it creates different message objects.
Charles Easton
East Tech Incorporated
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
-
2009-06-23
That works great!
I guess the functionality of parsing the messages from here into RepeatingGroups is missing based on the other comments in this thread. I will give it a shot and see how it goes.
Thanks,
Luke
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
-
2009-07-10
I have made a successful implementation of parsing Repeating Groups on Incoming messages. I've only applied it to one or two message types but happy to make it available to others if they want to use it. I'm not that familiar with the best way to post on sourceforge though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
dumbmoney: its been 2 years since your reply - but if you are still around i would like to have a look at your code wrt parsing repeating groups. It would be nice if you could post the relevant snippet , where ever it is convenient.
Regards,
Andy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How does MessageFactory parse incoming message which have Groups or Sequences?
Example:
SecurityDefinition(d) : InstrmtLegGrp
I'm not seeing anything in the code which parses the group field specifically.
Thanks,
-jd-
I only implemented repeating groups in the FIX 4.4 library. I never had a need for it in the 4.0 & 4.2 libraries. The concepts to implement repeating groups are applicable to those libraries but I never had the time to implement them.
Another option would be to use the base FIX library that puts all those fields in a FieldCollection object. This gives you flexibility to iterate over all fields and build your own lists of repeating groups.
Hope this helps...
Charles Easton
East Tech Incorporated
I have the 4.4 code. You mind telling me what file(s) the Repeating groups are in?
Thanks,
-jd-
You are right. After take a 2nd look I only implemented the build side. So it knows how to build a FIX message with repeating groups but doesn't know how to parse them.
Since the parse method won't actually do anything with repeating tags it's treated as a custom tag and goes into the FieldCollection. You can either try to access the field there or make updates to the Helper class parse methods.
Sorry for leaving it in a half finished state...
Charles Easton
East Tech Incorporated
Okay. I thought that was the case. I wanted to make sure I didn't have something missing from source.
-jd-
Hi Charles,
How is it there was never a need to parse repeating groups as Quotes often come with repeating groups? I find myself in a situation of committing to porting a project to your library and now encountering this dilemma. For FX, Currenex is FIX 4.2 and often repeating Groups are used. I prefer using 100% managed code than QuickFix so hoping I can get a solution. I suppose there is a solution with customizing the parser engine but I'm hoping there is an easier solution based on what you already have there. Any comments/advice appreciated.
Thanks
Luke
I never finished all the FIX 4.2 messages. It probably wouldn't take long for me to implement the messages you need, even if they have repeating groups, but then you would have to integrate with my new release. Since this is open source I can not commit to a date but I'm willing to work on it since it's not finished as was meant to be finished.
What messages would you want to too quickly?
Charles Easton
East Tech Incorporated
Hi Charles,
Thanks so much for the quick response. The main Message type I need to implement is MarketDataSnapshotFullRefresh ( "W" ) for FIX 4.4 as well as FIX 4.2.
I don't seem to have figured out how to use this message type in FIX 4.4 either. Perhaps if I am able to get FIX 4.4 working I will be able to apply that to the FIX 4.2 message types. Here is a brief description of how I am attempting to implement the library.
I connect and subscribe to the Received/MessageEventHandler event of the SocketEngine class. Then I try to caste the message type IMessage to the type of message it is. My code looks like this:
void engineConnect_Received(IEngine engine, IMessage message)
{
if (message.MsgType == "W")
{
//one attempt
FIX4NET.FIX.FIX_4_4.MarketDataSnapshotFullRefresh ms = (FIX4NET.FIX.FIX_4_4.MarketDataSnapshotFullRefresh)message;
//another attempt
FIX4NET.FIX.FIX_4_4.MarketDataSnapshotFullRefresh snapMsg = (FIX4NET.FIX.FIX_4_4.MarketDataSnapshotFullRefresh)engine.MessageFactory.Parse(msg.MessageRaw);
}
}
In both cases I receive the exception message: System.InvalidCastException: Unable to cast object of type 'FIX4NET.FIX.Message' to type 'FIX4NET.FIX.FIX_4_4.MarketDataSnapshotFullRefresh'
I've looked into the code but don't really seem to be able to see where it works in this case of casting or parsing these message types.
Any advice/help appreciated.
Thanks,
Luke
Make sure you initialize the SocketEngine with the FIX 4.4 MessageFactoryFIX.
SocketEngine engine = new SocketEngine();
engine.MessageFactory = new FIX4NET.FIX.FIX_4_4.MessageFactoryFIX();
This is how FIX4NET creates message objects from the raw FIX message. Depending on what type of factory you give the engine it creates different message objects.
Charles Easton
East Tech Incorporated
That works great!
I guess the functionality of parsing the messages from here into RepeatingGroups is missing based on the other comments in this thread. I will give it a shot and see how it goes.
Thanks,
Luke
I have made a successful implementation of parsing Repeating Groups on Incoming messages. I've only applied it to one or two message types but happy to make it available to others if they want to use it. I'm not that familiar with the best way to post on sourceforge though.
dumbmoney: its been 2 years since your reply - but if you are still around i would like to have a look at your code wrt parsing repeating groups. It would be nice if you could post the relevant snippet , where ever it is convenient.
Regards,
Andy