OpenMAMA Message Type Handling

The SolOpenMAMA Plug-In receives the following standard market data-oriented OpenMAMA message types, it converts them into one of the following Plug-In message types:

The Plug-In will discard any messages that cannot be categorized as one of the types listed above. Also it will generate a PubSub+ Cache NOTICE level (the default PubSub+ Cache log level) log entry about this message.

The following table summarizes how OpenMAMA message types are converted into Plug-In message types.

OpenMAMA Message Type Plug-In Message Type

MAMA_MSG_TYPE_INITIAL

SOLCACHE_MSG_TYPE_INITIAL

MAMA_MSG_TYPE_SNAPSHOT

SOLCACHE_MSG_TYPE_INITIAL

MAMA_MSG_TYPE_RECAP

SOLCACHE_MSG_TYPE_INITIAL

MAMA_MSG_TYPE_DDICT_SNAPSHOT

SOLCACHE_MSG_TYPE_INITIAL

MAMA_MSG_TYPE_UPDATE

SOLCACHE_MSG_TYPE_UPDATE

MAMA_MSG_TYPE_CANCEL

SOLCACHE_MSG_TYPE_UPDATE

MAMA_MSG_TYPE_ERROR

SOLCACHE_MSG_TYPE_UPDATE

MAMA_MSG_TYPE_CORRECTION

SOLCACHE_MSG_TYPE_UPDATE

MAMA_MSG_TYPE_CLOSING

SOLCACHE_MSG_TYPE_UPDATE

MAMA_MSG_TYPE_PREOPENING

SOLCACHE_MSG_TYPE_UPDATE

MAMA_MSG_TYPE_QUOTE

SOLCACHE_MSG_TYPE_UPDATE

MAMA_MSG_TYPE_TRADE

SOLCACHE_MSG_TYPE_UPDATE

MAMA_MSG_TYPE_ORDER

SOLCACHE_MSG_TYPE_UPDATE

MAMA_MSG_TYPE_BOOK_INITIAL

SOLCACHE_MSG_TYPE_BOOK_INITIAL

MAMA_MSG_TYPE_BOOK_SNAPSHOT

SOLCACHE_MSG_TYPE_BOOK_INITIAL

MAMA_MSG_TYPE_BOOK_RECAP

SOLCACHE_MSG_TYPE_BOOK_INITIAL

MAMA_MSG_TYPE_BOOK_CLEAR

SOLCACHE_MSG_TYPE_BOOK_INITIAL

MAMA_MSG_TYPE_BOOK_UPDATE

SOLCACHE_MSG_TYPE_BOOK_UPDATE

MAMA_MSG_TYPE_DELETE

SOLCACHE_MSG_TYPE_DELETE

MAMA_MSG_TYPE_EXPIRE

SOLCACHE_MSG_TYPE_DELETE

MAMA_MSG_TYPE_NOT_PERMISSIONED

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_NOT_FOUND

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_END_OF_INITIALS

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_WOMBAT_REQUEST

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_WOMBAT_CALC

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_SEC_STATUS

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_MISC

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_TIBRV

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_FEATURE_SET

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_SYNC_REQUEST

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_REFRESH

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_WORLD_VIEW

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_NEWS_QUERY

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_NULL

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_ENTITLEMENTS_REFRESH

SOLCACHE_MSG_TYPE_DISCARD

MAMA_MSG_TYPE_UNKNOWN

SOLCACHE_MSG_TYPE_DISCARD

SOLCACHE_MSG_TYPE_INITIAL

Initial messages are minimally validated to ensure that it they have proper Solace payloads. This allows any basic message format errors to be detected and reported when the initial value is cached instead of later during cache update operations.

Initial messages are already in the format that a subscriber expects when it makes a PubSub+ Cache Instance request. Therefore, the Plug-In does not perform any additional processing on an initial message, and the message is cached unmodified.

Multi-part initial value messages are not supported.

SOLCACHE_MSG_TYPE_UPDATE

When an update message is received, the Plug-In merges any updates from the new message with the cached message for the same topic by iterating over the fields of the received message’s payload and updating the corresponding fields in the cached message’s payload. When the information is merged the following occurs:

  • if the field does not exist in the cached message, it is added
  • if the field exists in the cached message, its value is replaced with that from the received update message

If the PubSub+ Cache Instance does not have an Initial message for the update’s topic, the update message is either discarded or written to the PubSub+ Cache Instance. The action to take is determined by the update_before_initial property of the Plug-In configuration file (for information, refer to Configuring Message Caching).

Note:

  • The message type field of the cached message is not changed from initial to update. This allows the message provided to a requesting client through a cache response to emulate a response provided to a subscriber that requests an initial value from a publisher.
  • If the update message contains OpenMAMA’s SubMsg fields, those fields will either replace the corresponding fields in the cached message, or be merged with the corresponding fields in the cached message. The action that is taken is determined by the value defined for the mama.solace.cacheplugin.submsg_field_alg property of the mama.properties configuration file. For more information, refer to Configuring Message Caching.

SOLCACHE_MSG_TYPE_BOOK_INITIAL

When an initial book message is received, the Plug-In does the following:

  1. Validates that the received message has a proper message format. This allows any basic message format errors to be detected and reported when the initial value of a topic is cached rather than later during cache update operations.
  2. Uses OpenMAMDA functions to modify the message’s format to one that a subscriber expects when it makes an order book request.
  3. If the initial book message is received after a previous initial book message has already been cached, the Plug-In may update cached values with those provided by latest received initial book message. For example, the MamaFieldMsgStatus, MamaFieldSeqNum, MamaFieldSenderId fields may be updated.
  4. If the received message was a recap book message, the current state of the order book is added to the message to be cached.
  5. Instructs the PubSub+ Cache Instance to cache the initial book message.

When the Plug-In receives a MAMA_MSG_TYPE_BOOK_CLEAR message type, the cached book message is retained, but all the entries in the book message are cleared.

SOLCACHE_MSG_TYPE_BOOK_UPDATE

When an update book message is received, the Plug-In does the following:

  1. Retrieves the cached book value message to be modified from the PubSub+ Cache Instance.
  2. Uses OpenMAMDA functions to add the new values provided by the received book update message to the cached book value.
  3. Instructs the PubSub+ Cache Instance to cache the modified book value message.

When a book update is received for a topic for which there is no cached initial message, the update message is discarded and an error is logged.

SOLCACHE_MSG_TYPE_DELETE

When a delete message is received, the Plug-In instructs the PubSub+ Cache Instance to delete the cache entry for the given topic and discards the message.

Delete messages are typically received for non-book data, but they can also be received for book or dictionary data.

SOLCACHE_MSG_TYPE_DISCARD

If an OpenMAMA message is converted to the SOLCACHE_MSG_TYPE_DISCARD type, then this message is explicitly not applicable to Solace PubSub+ or it is identified an OpenMAMA internal message.

The Plug-In will instruct the PubSub+ Cache Instance to discard this type of message, and it will generate a PubSub+ Cache DEBUG level log entry for it.