{{Quickfixn}} Custom Dictionaries - how can I make them active?

Grant Birchmeier gbirchmeier at connamara.com
Thu Feb 4 07:58:53 PST 2021


Your questions are perfectly rational and understandable.  This is
something that often trips new users up.

Think of message reception as being in 2 phases:
1) receiving the message and validating it against the configured DD xml
file, and creating a generic Message object
2) the engine passing that generic Message object to your app code, where
MessageCracker or your own logic may convert it to specific FIX message
classes/fields

In (1), the engine uses your configured DD to read and validate the
message, and create a generic Message object.  If the message had
DD-validation errors, like missing required fields, it would be rejected
like you'd expect.

In (2), now you have a generic Message object.  Say your DD defined a
"FooTradeReport" with 35="FTR".  If you received such a message, then
msg.Header.GetString(35) would indeed return "FTR".  All the generic
field/group accessors (e.g. GetField(), GetGroup(), GetDateTime(), etc)
will return fields and groups in the message according to your DD.

But "crack()" won't work, because there's no "FooTradeReport" message
class.  That's what you *really* want, right?  With proper
named-field accessors?  But nobody wrote any C# source for that class, so
it doesn't exist.

*But you can generate it!  *All the message classes and fields in fix44.dll
(and the others) are generated from the default DD xml files.  And you can
do it too!  Only... you have to use Ruby.  (This is a long-standing
speedbump on the project.  I am literally this week working on a
C#-implemented code-generator, but it's not ready yet.)

This email is getting long, so I'll stop being wordy and just hit you with
the steps:
1) install Ruby (2.5 or later)
2) run "gem install nokogiri" to install this Ruby xml library
3) get the QF/n source from github
4) overwrite spec/fix/FIX44.xml with your DD
5) run "ruby generator\generate.rb"
6) Open QuickFIXn.sln and build
7) Get your new dlls from Messages/FIX44/bin

Depending on your DD's changes, some UnitTests and Examples might break
because they are expecting the "vanilla" FIX44 classes.  Don't worry about
it.  You don't need those anyway.

Please let me know if you have questions.


On Thu, Feb 4, 2021 at 8:38 AM <alancloughley at hotmail.com> wrote:

> Hi,
>
>
>
> I’m getting to grips with building my own QF app however I am having some
> problems when it comes to using XML Dictionaries.
>
>
>
> My broker provides a custom dictionary in xml format, this is required
> because it contains message types that are not standard. In my QFapp’s cfg
> file I point it towards the brokers xml dictionary however my app seems to
> still just be using the standard Fix44 xml, I cannot reference any of the
> custom message types listed in the brokers xml filw. I noticed that along
> with the standard FIX44 xml file, there is also a fix44.dll file that gets
> referenced in my app. So, in order to use my brokers xml dictionary is
> there a step I need to take to turn the brokers xml file into into a dll
> file first? If that is the case, how do I build the dictionary dll file?
> Also, just for my better understanding of the whole process, currently I
> reference the standard fix44.dll in my app, however in my cfg file, I
> reference the brokers xml dictionary, I am just wandering what is actually
> happening if my cfg file is pointing towards an xml dictionary that doesn’t
> appear to be in use by the app?
>
>
>
> Thanks
>
>
>
> Al
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>


-- 
Grant Birchmeier
*Connamara Systems, LLC*
*Made-To-Measure Trading Solutions.*
Exactly what you need. No more. No less.
http://connamara.com

-- 
This email, along with any attachments, is confidential. If you believe you 
received this message in error, please contact the sender immediately and 
delete all copies of the message. Thank you from Connamara Systems, LLC.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20210204/df9d1fc1/attachment.htm>


More information about the Quickfixn mailing list