|
From: Naresh B. <NB...@sa...> - 2007-03-28 23:39:01
|
Hi,
=20
I am just starting out with QuickFIX/J and was wondering if the
DataDictionary can be used to create messages. I want to use a different
DataDictionary for every targetComp in my system - these dictionaries
will store customizations for each targetComp. I have two questions:
=20
1) Given a message name (e.g. "NewOrderSingle"), how can I get the
msgType (e.g. "D") using the DataDictionary? I do not readily see an
method to do this.
=20
2) Is it safe to create fields using code like new ClOrdID("321")? I see
that the constructor of ClOrdID hard codes the field tag to "11". Are
these tags values same across all FIX versions? I am thinking of this
alternate approach to pick up the tag value from the data dictionary -
does it make sense or is it needlessly complicated?
=20
new StringField(dd.getFieldTag("ClOrdID"), "321")
=20
Thanks.
Naresh
=20
|
|
From: Toli K. <to...@ma...> - 2007-03-29 00:47:34
|
Naresh,
Maybe i'm not understanding what you ultimately want to do.
> 1) Given a message name (e.g. "NewOrderSingle"), how can I get the msgTyp=
e
> (e.g. "D") using the DataDictionary? I do not readily see an method to do
> this.
The usual pattern is to use a MessageFactory to create a message:
factory.create(MsgType.ORDER_SINGLE)
> 2) Is it safe to create fields using code like new ClOrdID("321")? I see
> that the constructor of ClOrdID hard codes the field tag to "11". Are the=
se
> tags values same across all FIX versions? I am thinking of this alternate
> approach to pick up the tag value from the data dictionary =96 does it ma=
ke
> sense or is it needlessly complicated?
The ClOrdID.FIELD value is the same across all FIX versions. the
quickfix.field.xxx objects are auto-generated from the FIX4x.xml data
dictionary files so the values should be constant.
> new StringField(dd.getFieldTag("ClOrdID"), "321")
so this may be better written as: new ClOrdID("321") or new
StringField(ClOrdID.FIELD, "321") if you don't want to be specific.
If you are adding your own custom fields to the FIX4x.xml file, then
go ahead and create the objects for them - that's what we did, you can
see the example at
http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/core/src/main=
/java/org/marketcetera/quickfix/customfields/NoMarketDataSnapshots.java
hope this helps.
--=20
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.
|
|
From: Naresh B. <NB...@sa...> - 2007-03-29 01:46:14
|
Maybe I need to give some more context. The requirement I have is to be
able to change the message metadata dynamically. For example, if a
custom field tag value is wrong in a running system, then I should be
able to correct it without bouncing the system. Hence message creation
and parsing should be completely metadata driven (no hard coding is
allowed in code). I think message parsing can be completely driven by
the DataDictionary, but I am not sure if message creation can be driven
by the same metadata, especially due to issue #1. What I need is a
simple method on the DataDictionary that returns a msgType given the
message name. For example,
String getMsgType(String msgName);
Thus dd.getMsgType("NewOrderSingle") will return "D".
I think the DataDictionary has this information, I just don't see a
method to get it out of there.
Naresh
-----Original Message-----
From: qui...@li...
[mailto:qui...@li...] On Behalf Of Toli
Kuznets
Sent: Wednesday, March 28, 2007 8:47 PM
To: qui...@li...
Subject: Re: [Quickfixj-users] Can DataDictionary be used to create
messages?
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Naresh,
Maybe i'm not understanding what you ultimately want to do.
> 1) Given a message name (e.g. "NewOrderSingle"), how can I get the
msgType
> (e.g. "D") using the DataDictionary? I do not readily see an method to
do
> this.
The usual pattern is to use a MessageFactory to create a message:
factory.create(MsgType.ORDER_SINGLE)
> 2) Is it safe to create fields using code like new ClOrdID("321")? I
see
> that the constructor of ClOrdID hard codes the field tag to "11". Are
these
> tags values same across all FIX versions? I am thinking of this
alternate
> approach to pick up the tag value from the data dictionary - does it
make
> sense or is it needlessly complicated?
The ClOrdID.FIELD value is the same across all FIX versions. the
quickfix.field.xxx objects are auto-generated from the FIX4x.xml data
dictionary files so the values should be constant.
> new StringField(dd.getFieldTag("ClOrdID"), "321")
so this may be better written as: new ClOrdID("321") or new
StringField(ClOrdID.FIELD, "321") if you don't want to be specific.
If you are adding your own custom fields to the FIX4x.xml file, then
go ahead and create the objects for them - that's what we did, you can
see the example at
http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/core/src/m
ain/java/org/marketcetera/quickfix/customfields/NoMarketDataSnapshots.ja
va
hope this helps.
--=20
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.
------------------------------------------------------------------------
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDE
V
_______________________________________________
Quickfixj-users mailing list
Qui...@li...
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
|
|
From: Toli K. <to...@ma...> - 2007-03-29 06:40:23
|
Ah, the context helps. Now it makes sense. Looking at the DataDictionary, it seems that it doesn't actually track msgTypeName -> msgType mappings. But it can be easily done in the DataDictionary.addValueName() function You should file an RFE: http://www.quickfixj.org/jira/, including your use case. It's pretty easy to implement, but i'd defer to Steve Bate to make a decision on whether or not and how to implement this, or to perhaps suggest an alternative work flow. On 3/28/07, Naresh Bhatia <NB...@sa...> wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > Maybe I need to give some more context. The requirement I have is to be > able to change the message metadata dynamically. For example, if a > custom field tag value is wrong in a running system, then I should be > able to correct it without bouncing the system. Hence message creation > and parsing should be completely metadata driven (no hard coding is > allowed in code). I think message parsing can be completely driven by > the DataDictionary, but I am not sure if message creation can be driven > by the same metadata, especially due to issue #1. What I need is a > simple method on the DataDictionary that returns a msgType given the > message name. For example, > > String getMsgType(String msgName); > > Thus dd.getMsgType("NewOrderSingle") will return "D". > > I think the DataDictionary has this information, I just don't see a > method to get it out of there. > > Naresh > > -----Original Message----- > From: qui...@li... > [mailto:qui...@li...] On Behalf Of Toli > Kuznets > Sent: Wednesday, March 28, 2007 8:47 PM > To: qui...@li... > Subject: Re: [Quickfixj-users] Can DataDictionary be used to create > messages? > > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > Naresh, > > Maybe i'm not understanding what you ultimately want to do. > > > 1) Given a message name (e.g. "NewOrderSingle"), how can I get the > msgType > > (e.g. "D") using the DataDictionary? I do not readily see an method to > do > > this. > The usual pattern is to use a MessageFactory to create a message: > factory.create(MsgType.ORDER_SINGLE) > > > 2) Is it safe to create fields using code like new ClOrdID("321")? I > see > > that the constructor of ClOrdID hard codes the field tag to "11". Are > these > > tags values same across all FIX versions? I am thinking of this > alternate > > approach to pick up the tag value from the data dictionary - does it > make > > sense or is it needlessly complicated? > > The ClOrdID.FIELD value is the same across all FIX versions. the > quickfix.field.xxx objects are auto-generated from the FIX4x.xml data > dictionary files so the values should be constant. > > > new StringField(dd.getFieldTag("ClOrdID"), "321") > > so this may be better written as: new ClOrdID("321") or new > StringField(ClOrdID.FIELD, "321") if you don't want to be specific. > > If you are adding your own custom fields to the FIX4x.xml file, then > go ahead and create the objects for them - that's what we did, you can > see the example at > http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/core/src/m > ain/java/org/marketcetera/quickfix/customfields/NoMarketDataSnapshots.ja > va > > hope this helps. > > -- > Toli Kuznets > http://www.marketcetera.com: Open-Source Trading Platform > download.run.trade. > > ------------------------------------------------------------------------ > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE > V > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > -- Toli Kuznets http://www.marketcetera.com: Open-Source Trading Platform download.run.trade. |
|
From: Naresh B. <NB...@sa...> - 2007-03-29 12:48:58
|
Thanks Toli. I have added an enhancement request to JIRA: QFJ-159. =20 Just out of curiosity, are message types and field tags compatible = between the various FIX versions? I understand that messages and fields = may be added / removed between various versions, but is it possible that = the same message can have a different MsgType or the same field can have = a different field tag? =20 Thanks. Naresh ________________________________ From: qui...@li... on behalf of Toli = Kuznets Sent: Thu 3/29/2007 2:40 AM To: qui...@li... Subject: Re: [Quickfixj-users] Can DataDictionary be used to create = messages? QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ QuickFIX/J Support: http://www.quickfixj.org/support/ Ah, the context helps. Now it makes sense. Looking at the DataDictionary, it seems that it doesn't actually track msgTypeName -> msgType mappings. But it can be easily done in the DataDictionary.addValueName() function You should file an RFE: http://www.quickfixj.org/jira/, including your use case. It's pretty easy to implement, but i'd defer to Steve Bate to make a decision on whether or not and how to implement this, or to perhaps suggest an alternative work flow. On 3/28/07, Naresh Bhatia <NB...@sa...> wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > Maybe I need to give some more context. The requirement I have is to = be > able to change the message metadata dynamically. For example, if a > custom field tag value is wrong in a running system, then I should be > able to correct it without bouncing the system. Hence message creation > and parsing should be completely metadata driven (no hard coding is > allowed in code). I think message parsing can be completely driven by > the DataDictionary, but I am not sure if message creation can be = driven > by the same metadata, especially due to issue #1. What I need is a > simple method on the DataDictionary that returns a msgType given the > message name. For example, > > String getMsgType(String msgName); > > Thus dd.getMsgType("NewOrderSingle") will return "D". > > I think the DataDictionary has this information, I just don't see a > method to get it out of there. > > Naresh > > -----Original Message----- > From: qui...@li... > [mailto:qui...@li...] On Behalf Of = Toli > Kuznets > Sent: Wednesday, March 28, 2007 8:47 PM > To: qui...@li... > Subject: Re: [Quickfixj-users] Can DataDictionary be used to create > messages? > > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > Naresh, > > Maybe i'm not understanding what you ultimately want to do. > > > 1) Given a message name (e.g. "NewOrderSingle"), how can I get the > msgType > > (e.g. "D") using the DataDictionary? I do not readily see an method = to > do > > this. > The usual pattern is to use a MessageFactory to create a message: > factory.create(MsgType.ORDER_SINGLE) > > > 2) Is it safe to create fields using code like new ClOrdID("321")? I > see > > that the constructor of ClOrdID hard codes the field tag to "11". = Are > these > > tags values same across all FIX versions? I am thinking of this > alternate > > approach to pick up the tag value from the data dictionary - does it > make > > sense or is it needlessly complicated? > > The ClOrdID.FIELD value is the same across all FIX versions. the > quickfix.field.xxx objects are auto-generated from the FIX4x.xml data > dictionary files so the values should be constant. > > > new StringField(dd.getFieldTag("ClOrdID"), "321") > > so this may be better written as: new ClOrdID("321") or new > StringField(ClOrdID.FIELD, "321") if you don't want to be specific. > > If you are adding your own custom fields to the FIX4x.xml file, then > go ahead and create the objects for them - that's what we did, you can > see the example at > = http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/core/src/m > = ain/java/org/marketcetera/quickfix/customfields/NoMarketDataSnapshots.ja > va > > hope this helps. > > -- > Toli Kuznets > http://www.marketcetera.com: Open-Source Trading Platform > download.run.trade. > > = ------------------------------------------------------------------------ > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to = share > your > opinions on IT & business topics through brief surveys-and earn cash > = http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE > V > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > > = -------------------------------------------------------------------------= > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to = share your > opinions on IT & business topics through brief surveys-and earn cash > = http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > -- Toli Kuznets http://www.marketcetera.com: Open-Source Trading Platform download.run.trade. -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ Quickfixj-users mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfixj-users |
|
From: Joerg T. <Joe...@ma...> - 2007-03-29 19:56:35
|
Hi Naresh, On 03/29/07 14:48, Naresh Bhatia wrote: > Just out of curiosity, are message types and field tags compatible between the various FIX > versions? I understand that messages and fields may be added / removed between various versions, > but is it possible that the same message can have a different MsgType or the same field can have > a different field tag? Actually, field tags are never removed, just deprecated. Sometimes the names change, ie from IDSource in FIX 4.2 to SecurityIDSource in FIX 4.4, but the tag value stays the same. In addition, the tags are independent from the message type: The same tag value has the same meaning in every message which uses it. So if you upgrade from one FIX version to the next, either a tag is continued to be used with the same meaning (possibly a changed name) or it is deprecated (not used any longer). Hope that makes thing clearer for you. Cheers, Jörg -- Joerg Thoennes http://www.macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Geschäftsführer: Roger Macdonald Lothringer Str. 52, D-52070 Aachen Amtsgericht Aachen, HRB 8151, Ust.-Id DE813021663 |
|
From: Naresh B. <NB...@sa...> - 2007-03-29 20:37:51
|
That's the best explanation of FIX version differences I have seen thus = far. Somehow, it did not come across from the FIX manuals. Thanks so = much J=F6rg! =20 Naresh ________________________________ From: qui...@li... on behalf of Joerg = Thoennes Sent: Thu 3/29/2007 3:56 PM To: qui...@li... Subject: Re: [Quickfixj-users] Can DataDictionary be used to create = messages? QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ QuickFIX/J Support: http://www.quickfixj.org/support/ Hi Naresh, On 03/29/07 14:48, Naresh Bhatia wrote: > Just out of curiosity, are message types and field tags compatible = between the various FIX > versions? I understand that messages and fields may be added / removed = between various versions, > but is it possible that the same message can have a different MsgType = or the same field can have > a different field tag? Actually, field tags are never removed, just deprecated. Sometimes the = names change, ie from IDSource in FIX 4.2 to SecurityIDSource in FIX 4.4, but the tag value = stays the same. In addition, the tags are independent from the message type: The same = tag value has the same meaning in every message which uses it. So if you upgrade from one FIX version to the next, either a tag is = continued to be used with the same meaning (possibly a changed name) or it is deprecated (not used any = longer). Hope that makes thing clearer for you. Cheers, J=F6rg -- Joerg Thoennes http://www.macd.com <http://www.macd.com/> Tel.: +49 = (0)241 44597-24 Macdonald Associates GmbH Gesch=C3=A4ftsf=C3=BChrer: Roger = Macdonald Lothringer Str. 52, D-52070 Aachen Amtsgericht Aachen, HRB 8151, = Ust.-Id DE813021663 -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share = your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ Quickfixj-users mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfixj-users |