Developing with the publish_<msgName>_Message() Stub

Complete publish_<msgName>_Message() in a generated stub by initializing variables, adding error handling, and including the appropriate methods to set field values.

  1. For all fields in the message, initialize variables (Instrument, Quote_Date, and so on) that are to contain the data of the message. These variables are required for the PUB_SEND_MESSAGE_CONTEXT structure.
  2. Add error handling and logging where indicated in the stub comments.
  3. For fields that can be null, test for NULL and either:
    • Uncomment calls to pub_setNullField(), or,
    • Call another pub_set<type>Field() method.
  4. (Optional) For decimal fields, to use a different method, comment out pub_setDecimalField and uncomment the method you want.
  5. Add other processing as needed.
Related concepts
Example: Building a Market Data Message
publish_<msgName>_Message() Stub
Related reference
Supported Datatypes for Message Flow