{{Quickfixn}} FIX upgrade 1.8 logout event issue

Abhay Vora Abhay.Vora.Contractor at dodgeandcox.com
Mon Mar 4 03:29:43 PST 2019


Thanks Grant. I debugged the QuickFIX project and found that the exception is being thrown in DefaultMessageFactoryClass for incoming  messages that have group tags present.

_factories variable below is null and constructor which populates this variable is also not getting called which results in the error highlighted in yellow below.

Can you please suggest what might be causing this issue?

public class DefaultMessageFactory : IMessageFactory
    {
        private static int _dllLoadFlag;
        private readonly IReadOnlyDictionary<string, IMessageFactory> _factories;

        /// <summary>
        /// This consctructor will
        /// 1. Dynamically load all QuickFix.*.dll assemblies into the current appdomain
        /// 2. Find all IMessageFactory implementations in these assemblies (must have parameterless constructor)
        /// 3. Use them based on begin strings they support
        /// </summary>
        public DefaultMessageFactory()
        {
            var assemblies = GetAppDomainAssemblies();
            var factories = GetMessageFactories(assemblies);
            _factories = ConvertToDictionary(factories);
        }

        /// <summary>
        /// This constructor will save the IMessageFactory instances based on what they return from GetSupportedBeginStrings()
        /// </summary>
        /// <param name="factories">IMessageFactory instances</param>
        public DefaultMessageFactory(IEnumerable<IMessageFactory> factories)
        {
            _factories = ConvertToDictionary(factories);
        }

        /// <summary>
        /// This constructor will
        /// 1. Locate all IMessageFactory implementations from the provided assemblies (must have parameterless constructor)
        /// 2. Use them based on begin strings they support
        /// </summary>
        /// <param name="assemblies">Assemblies that may contain IMessageFactory implementations</param>
        public DefaultMessageFactory(IEnumerable<Assembly> assemblies)
        {
            var factories = GetMessageFactories(assemblies);
            _factories = ConvertToDictionary(factories);
        }

        public Group Create(string beginString, string msgType, int groupCounterTag)
        {
            // FIXME: This is a hack.  FIXT11 could mean 50 or 50sp1 or 50sp2.
            // We need some way to choose which 50 version it is.
            // Choosing 50 here is not adequate.
            var key = beginString.Equals(FixValues.BeginString.FIXT11)
                ? FixValues.BeginString.FIX50
                : beginString;

            if (_factories.TryGetValue(key, out var factory))
            {
                return factory.Create(beginString, msgType, groupCounterTag);
            }
            else
            {
                throw new UnsupportedVersion(beginString);
            }
        }

Thanks
From: Quickfixn [mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Grant Birchmeier
Sent: Monday, February 25, 2019 8:31 AM
To: Mailing list for QuickFIX/n
Subject: Re: {{Quickfixn}} FIX upgrade 1.8 logout event issue

This is an EXTERNAL EMAIL. Stop and think before clicking a link or opening attachments.
I added a small improvement sometime back that adds the found BeginString into field 58, so you'll at least know what the engine thinks it's actually seeing.  Can you make a build from latest and give it a try?

NOTE: there was a change that split the QF/n binaries into message specific DLLs, so you'll now need to include both QuickFix.dll and QuickFix.FIX44.dll.  (You can find both in Messages\FIX44\bin\<x>\<x>\)

When I saw this problem, it turned out that my QuickFix.dll was not finding my QuickFix.FIX44.dll due to some wacky windows hijinks.  I don't expect that to be the case for you (since 1.8 didn't split the dll yet), but we can see if it goes away in the latest codebase.  And if it doesn't go away, the updated error message might give us a clue.

-Grant

On Mon, Feb 25, 2019 at 4:44 AM Abhay Vora <Abhay.Vora.Contractor at dodgeandcox.com<mailto:Abhay.Vora.Contractor at dodgeandcox.com>> wrote:
Hi,

I am working on an application which sends and receives  FIX messages to the BLP session. Our application is a WCF service hosted on Windows IIS. This application has business logic to send and process the FIX messages and it uses FIX version 1.8 dlls to establish connection with Bloomberg session.

We are able to send message type = D to Bloomberg(BLP) session. On processing this message, BLP session is sending the  execution report acknowledgement message (35=8, 150=0) successfully to us. While fix engine receives and parses this message, it is throwing an error with message type = 5(logout) to the BLP session. Below is the message logged in the fixstore log file:  8=FIX.4.49=8535=549=IRS56=BLP34=352=20190225-08:44:16.48358=Incorrect BeginString10=179.

This issue started coming when we started to use 1.8 version client side FIX dlls.  Please note, when we deploy this application(which contains our business logic + FIX dlls ) and restart the WCF service, everything works fine as expected. The issue starts on subsequent restart of this IIS service. If we deploy the bits again on encountering the Incorrect BeginString error, it starts to work again till the point we do not restart the service. So, issue is that restarting the service is causing trouble and starts sending logout messages to BLP session. Only way to correct is to redeploy the bits again.

Can you please suggest what might be causing this issue as everything is working fine if we use our existing 1.1 version FIX dlls.

Many Thanks
________________________________
Please follow the hyperlink to important disclosures.
https://www.dodgeandcox.com/disclosures/email_disclosure_funds.html
_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com<mailto:Quickfixn at lists.quickfixn.com>
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.quickfixn.com_listinfo.cgi_quickfixn-2Dquickfixn.com&d=DwMFaQ&c=AQ5yCnCZOLz3HYYKvbnj5ppyDxNZuxkzDrQyIFuxC1E&r=JPV8QVxFRDcfzBl0MFbNPfqe_45vCThWzqPhDx41k-3u7y246hC-MXudLMhBfk3D&m=kiFqqIJ6Tfru1jnz1CyLgJUB2wmIrT6pKQXY9kwjeNY&s=KTUWq13mMvn9P5ib4qmykpbxA_xiyPQaOTK_Ppz3xFM&e=>


--
Grant Birchmeier
Connamara Systems, LLC
Made-To-Measure Trading Solutions.
Exactly what you need. No more. No less.
http://connamara.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__connamara.com&d=DwMFaQ&c=AQ5yCnCZOLz3HYYKvbnj5ppyDxNZuxkzDrQyIFuxC1E&r=JPV8QVxFRDcfzBl0MFbNPfqe_45vCThWzqPhDx41k-3u7y246hC-MXudLMhBfk3D&m=kiFqqIJ6Tfru1jnz1CyLgJUB2wmIrT6pKQXY9kwjeNY&s=O6qmzWqMMXHJoXHnN92vgGTrK3IlqMEzHYbKE-fQ_AM&e=>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20190304/433b4398/attachment.htm>


More information about the Quickfixn mailing list