{{Quickfixn}} Generating messages from fix message string.
Grant Birchmeier
gbirchmeier at connamara.com
Thu Dec 5 12:40:13 PST 2013
You mean replay in a test-environment context, i.e. to confirm that you've
fixed a parsing bug? Then that makes a certain amount of sense.
We actually made a different tool, not in QF, that just sends and receives
raw FIX messages. (You can't really make QF send incorrect messages, by
design, so we needed a tool like this to test abnormal situations.) I
guess when we encounter message errors like that, we test it at the
acceptance-test level rather than unit test.
On Thu, Dec 5, 2013 at 2:33 PM, Pete Riehl <priehl at saierscapital.com> wrote:
> I am getting the messages from a live connection. In the event that I
> reject the message due to a poorly formed dd or poor parsing logic, I’d
> like to replay the message rather than try to re generate the same one in
> the vendor’s test environment. Is there a better way to do this? Your
> surprise seems to imply that there is. If you achieve this in a better
> way, I’d love to try it.
>
>
>
> Thanks for your help,
>
>
>
> Now I’ll answer this question next time it comes up J
>
>
>
> *From:* quickfixn-bounces at lists.quickfixn.com [mailto:
> quickfixn-bounces at lists.quickfixn.com] *On Behalf Of *Grant Birchmeier
> *Sent:* Thursday, December 05, 2013 1:34 PM
> *To:* Mailing list for QuickFIX/n
> *Subject:* Re: {{Quickfixn}} Generating messages from fix message string.
>
>
>
> I am continually surprised by how many people want to do this. Where are
> you guys getting your FIX strings from if not from a live FIX connection?
>
>
>
> Anyway, you want Message.FromString(). Use it like follows:
>
>
>
> string msgStr = <your message>
>
>
>
> var dd = new QuickFix.DataDictionary.DataDictionary();
>
> dd.Load("../../../spec/fix/FIX44.xml"); // or whatever file
>
>
>
> IMessageFactory defaultMsgFactory = new DefaultMessageFactory();
>
>
>
> var msg = new QuickFix.FIX44.ExecutionReport();
>
> msg.FromString(msgStr,true,dd,dd,defaultMsgFactory);
>
>
>
> I stole all that straight from the unit tests.
>
>
>
> I'm gonna put this is the FAQ right now. I answer this question way too
> often.
>
>
>
> -Grant
>
>
>
> On Thu, Dec 5, 2013 at 11:09 AM, Pete Riehl <priehl at saierscapital.com>
> wrote:
>
> Hello,
>
> I believe this may have been mentioned in a previous chain, but cannot
> find any documentation on it.
>
> I would like to take the text of a fix message and pass it through my
> parser. In the original Quickfix library, you could use the set string
> method on any message type.
>
> ExecutionReport exec = new ExecutionReport();
>
> exec.setString(text);
>
> There doesn’t seem to be any equivalent way to create the message in
> quickfix/n save for parsing your string and calling setfield.
>
> Any help would be appreciated.
>
> Pete
>
>
>
>
>
> The information contained in this electronic message is confidential and
> does not constitute investment advice or an offer to sell or the
> solicitation of an offer to purchase any security or investment product.
> Offers may only be made by means of delivery of an approved confidential
> offering memorandum, may be legally privileged and confidential under
> applicable law, and are intended only for the use of the individual or
> entity named above. We do not, and will not, effect or attempt to effect
> transactions in securities, or render personalized investment advice for
> compensation, through this email. All materials within this email have been
> provided to you for information purposes only and may not be relied upon by
> you in evaluating the merits of investing in any securities referenced
> herein. Our investment program involves substantial risk and no assurance
> can be given that our investment objectives will be achieved. Commodity
> trading involves substantial risk of loss. Past results are not necessarily
> indicative of future results. Any review, retransmission, dissemination, or
> taking of any action in reliance upon this information by persons or
> entities other than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material from any
> computer. Email transmissions are not secure, and we accept no liability
> for errors in transmission, delayed transmission, or other
> transmission-related issues. This message may contain confidential,
> proprietary or legally privileged information. Neither confidentiality nor
> any privilege is intended to be waived or lost by any error in
> transmission. Emails are subject to review and will be archived.
> _______________________________________________
> 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
>
>
> The information contained in this electronic message is confidential and
> does not constitute investment advice or an offer to sell or the
> solicitation of an offer to purchase any security or investment product.
> Offers may only be made by means of delivery of an approved confidential
> offering memorandum, may be legally privileged and confidential under
> applicable law, and are intended only for the use of the individual or
> entity named above. We do not, and will not, effect or attempt to effect
> transactions in securities, or render personalized investment advice for
> compensation, through this email. All materials within this email have been
> provided to you for information purposes only and may not be relied upon by
> you in evaluating the merits of investing in any securities referenced
> herein. Our investment program involves substantial risk and no assurance
> can be given that our investment objectives will be achieved. Commodity
> trading involves substantial risk of loss. Past results are not necessarily
> indicative of future results. Any review, retransmission, dissemination, or
> taking of any action in reliance upon this information by persons or
> entities other than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material from any
> computer. Email transmissions are not secure, and we accept no liability
> for errors in transmission, delayed transmission, or other
> transmission-related issues. This message may contain confidential,
> proprietary or legally privileged information. Neither confidentiality nor
> any privilege is intended to be waived or lost by any error in
> transmission. Emails are subject to review and will be archived.
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20131205/f6651925/attachment-0002.htm>
More information about the Quickfixn
mailing list