0

I have a quickfixj listener which should consume FIX50SP2 messages. I'm using DefaultMessageFactory with no parameters(means ApplVerId is 9 by default). You can see the settings below.

session.properties

[SESSION]
BeginString=FIXT.1.1
TargetCompID=FIX_TEST
StartDay=sunday
EndDay=friday
StartTime=21:35:00
EndTime=21:30:00
HeartBtInt=30
CheckLatency=N
SocketConnectPort=port
SocketConnectHost=ip
DefaultApplVerID=FIX.5.0SP2
UseDataDictionary=Y
DataDictionary=config/plugins/RData/RDataFIX50sp2.xml
FileStorePath=logs/plugins/RData/Client_Seq_Store
TransportDataDictionary=config/plugins/RData/FIXT11.xml
AppDataDictionary=config/plugins/RData/RDataFIX50sp2.xml

Pom.xml Related Dependencies

<dependency>
      <groupId>org.quickfixj</groupId>
      <artifactId>quickfixj-core</artifactId>
      <version>2.3.1</version>
</dependency>
<dependency>
      <groupId>org.quickfixj</groupId>
      <artifactId>quickfixj-messages-fix50sp2</artifactId>
      <version>2.3.1</version>
</dependency>

PluginApp.java

SessionSettings sessionSettings = new SessionSettings(this.sessionSettingsFilePath);
FileStoreFactory fileStoreFactory = new FileStoreFactory(sessionSettings);
ScreenLogFactory screenLogFactory = new ScreenLogFactory(sessionSettings);
FileLogFactory fileLogFactory = new FileLogFactory(sessionSettings);
LogFactory[] logFactoryArr = {screenLogFactory, fileLogFactory};
DefaultMessageFactory defaultMessageFactory = new DefaultMessageFactory();
CompositeLogFactory compositeLogFactory = new CompositeLogFactory(logFactoryArr);

this.initiator = new SocketInitiator(fixApp, fileStoreFactory, sessionSettings, compositeLogFactory, defaultMessageFactory);
this.initiator.start();

FIXApplication50.java related methods

public void onMessage(SecurityDefinitionUpdateReport rData, SessionID sessionID) {}
public void onMessage(SecurityDefinition rData, SessionID sessionID) {}
public void fromApp(Message message, SessionID sessionId)
        throws FieldNotFound, IncorrectTagValue, UnsupportedMessageType {

    crack(message, sessionId);
}

Problem is messages coming as FIX50. With these settings my engine sending Unsupported Message Type message to the counterparty for all message types. I tried with full classnames in onMessage parameters. When I add FIX50 message dependencies to the pom, onMessage methods work but this leads me an unsolvable error. I'm expecting messages as FIX50SP2. The whole configuration was made for it. Do you have any idea?

EDIT 1

Incoming Fix Message Sample(Couldn't share full message because confidentiality)

8=FIXT.1.19=006435=d49=FOO_TEST56=FOO34=542957=BAR52=20220408-13:23:13.40110=053
estherial
  • 39
  • 5
  • Can't really tell what the problem is without more code. Please show the code where the message cracker is called, I don't see anything related in the code above. Edit: but you surely are receiving FIX50SP2 messages? Do you have an example message that you receive? – Christoph John Apr 04 '22 at 21:16
  • @ChristophJohn sorry for late response. I added the fix message and fromApp to related methods. Couldn't share full fix message because of confidentiality. – estherial Apr 11 '22 at 14:17
  • @ChristophJohn Hi, could you please check on this? – estherial Aug 12 '22 at 14:57
  • What about this: https://stackoverflow.com/q/73053908/4962355 ? It seems you have an application running with FIX.5.0.SP2? The only difference in the config I could spot is `DefaultApplVerID=9` instead of `DefaultApplVerID=FIX.5.0SP2`. – Christoph John Aug 12 '22 at 19:59
  • The other topic has another application, Same counterparty but different connection. When i use quickfix50 dependencies, i can take messages(changing message classes in on message too) but that creates another problem. Which is https://stackoverflow.com/questions/71066918/quickfix-j-type-quickfix-field-haltreason-is-not-assignable-to-quickfix-intf So i'm trying to get messages as FIX50SP2. – estherial Aug 15 '22 at 09:31
  • Sorry I fail to understand where the problem is. If you have another application that works and the application in this question has a problem then this is no problem in QFJ. Could you double check your app and cracker implementation. Also make sure you compile against a current QFJ version, e.g. 2.3.1. – Christoph John Aug 15 '22 at 12:58
  • Session properties are the same(except hosts). Application classes and implementations are the same. The only difference is the MessageFactory. In the other application we are using our custom factory(which almost the same as DefaultMessageFactory). With that factory we can take messages as FIX50SP2. When we use custom factory for this topic's app, we are getting " Type 'quickfix/field/HaltReason' (current frame, stack[1]) is not assignable to 'quickfix/IntField'". Then you said "Use DefaultMessageFactory and last versions". So we did. But now i can't get messages as FIX50SP2 with DefaultFact. – estherial Aug 15 '22 at 19:30
  • HaltReason changed its type from char to int in FIX50SP2. So that error looks like your runtime dependencies are different from the compile time dependencies. Is this a stand alone app or does it run on Spring or Camel or similar? Could it be that there are other QFJ classes or libraries in the class path which are loaded instead of the desired ones? – Christoph John Aug 15 '22 at 20:30

0 Answers0