SOW Statistics Events

AMPS can publish SOW statistics for each SOW topic which has been configured. To enable this functionality, specify the SOWStatsInterval in the configuration file. The value provided in SOWStatsInterval is the time between updates to the /AMPS/SOWStats topic.

For example, the following would be a configuration that would publish /AMPS/SOWStats event messages every 5 seconds.

<AMPSConfig>
    ...
    <SOWStatsInterval>5s</SOWStatsInterval>
    ...
</AMPSConfig>

When a SOWStatsInterval is provided, AMPS publishes a message for each topic defined in the SOW at the requested interval. These messages contain basic information about the topic. The format of the /AMPS/SOWStats messages matches the message type of the connection that has requested the messages.

For example, the following message provides information in JSON format about a topic named a-sample-topic. That topic is of message type bflat.

{
 "SOWStats":{
    "message_type":"bflat",
    "topic":"a-sample-topic",
    "record_count":15021,
    "timestamp":"20161108T225452.280650Z"
 }
}

In the SOWStats message above, message_type provides the name of the message type, topic specifies the name of the topic, record_count shows the number of records currently in the topic and timestamp includes the time the event was generated.

The table below defines the header fields which may be returned as part of the subscription messages to the /AMPS/SOWStats topic.

FIX

XML

JSON/BSON/MsgPack

Definition

20007

MessageType

message_type

The message type of the topic.

20065

Timestamp

timestamp

Timestamp in which AMPS sent the message.

20066

Topic

topic

Topic that statistics are being reported on.

20067

Records

record_count

Number of records in the SOW topic.

For compatibility with systems that expect a consistent set of FIX tags across messages, AMPS provides a set of FIX tags that are unified with the tags used in the /AMPS/ClientStatus topic. To use the unified FIX tags, set the AMPSVersionCompliance configuration element to 5. The following table lists the unified FIX tags:

FIXDefinition

20007

The message type of the topic.

20065

Timestamp in which AMPS sent the message.

20068

Topic that statistics are being reported on.

20075

Number of records in the SOW topic.

The /AMPS/SOWStats topic is not available for protobuf, composite, binary or struct message types.

AMPS will report statistics for topics of those types, but the format for the messages that AMPS generates must be a message type that can accept arbitrary fields, not a message type that requires a single schema.

Last updated

Copyright 2013-2024 60East Technologies, Inc.