esanchezros / quickfixj-spring-boot-starter

Spring Boot Starter for QuickFIX/J
Apache License 2.0
126 stars 57 forks source link

Separate message cracker for separate session #113

Closed chusri closed 1 year ago

chusri commented 1 year ago

Hi @esanchezros,

May I ask, is it possible to separate the message cracker class for difference session, lets say i have one session for quote and another one for trade. So i need one message cracker to take responsibility to extract data for quote session only, and another class for trade data. if it's possible, could you please suggest how to do it?

Thanks Chusri

esanchezros commented 1 year ago

Hi @chusri,

The MessageCracker is just a helper class that calls the specific onMessage callback depending on the message type. It's typically used in the Application fromApp method to process the message but you can have your own implementation and depending on the session (quote or order management) call one handler or another. Alternatively you can have different applications completely separate, one for handling quote sessions only and another for handling order management only.