Difference between “group” and “component” in QuickFIX/J

前端 未结 3 830
梦毁少年i
梦毁少年i 2020-12-16 17:22

I am new to the FIX world. I am writing an application processing FIX messages in Java and for that I am using QuickFIX/J. I have downloaded the DataDictionary from the home

3条回答
  •  离开以前
    2020-12-16 17:49

    Components aren't really... things. They're like macros in the FIX DataDictionary (DD). Many messages need the same set of fields, so instead of specifying the same fields in every message, the DD defines a component that other messages can include.

    A Group, on the other hand, is a very real thing. It's a repeating sequence of fields that will appear 0 or more times in a message.

    QuickFIX's (QF) programming interface largely ignores components as a concept. You can't extract a component from a message because a component isn't a concept in QF; you just extract the fields like any other field.

    A hypothetical example: The following two message definitions are exactly the same.

    1. With a component

      
        
        
        
      
      
      
        
        
        
      
      
    2. Without a component

      
        
        
        
        
        
      
      

    See? A component is pretty much just a macro.

    Either way it's defined, you just end up calling msg.GetHeater() (or whatever).

提交回复
热议问题