3.4.2.7 Message: ChannelDataChange

Topic Version1Published10/31/2016
For StandardETP v1.1

Sent from a producer to a consumer to notify the consumer of changed data points on the channel. Sent for all changes, whether or not a particular consumer has previously been sent the original point. All data items must belong to the same channel, which MUST be specified in the channelId field of the main message. Processors MUST ignore the channelId field of the data items.

The message should be processed like this:

  1. Delete the data between, and inclusive of, startIndex and endIndex.
  2. Insert the points in the provided data element in its place.

This message is also used to delete data, in which case the data element simply has zero records.

Message Type ID: 6

Correlation Id Usage: n/a

Multi-part: False

Sent by: producer

Attribute

Description

Data Type

Min

Max

channelId

The channel to which all changes apply. The channelId in all data records MUST be the same as this value.

long

1

1

startIndex

The starting index of the data to be replaced by the supplied data.

long

1

1

endIndex

The ending index of the range to be replaced by the supplied data.

long

1

1

data

An array of data items to be replaced.

To delete all points in the range, send an empty array.

DataItem

0

n

Avro Source

{

      "type": "record",

      "namespace": "Energistics.Protocol.ChannelStreaming",

      "name": "ChannelDataChange",

      "messageType": "6",

      "protocol": "1",

      "senderRole": "producer",

      "protocolRoles": "producer,consumer",

      "fields":

     [

         { "name": "channelId", "type": "long" },

         { "name": "startIndex", "type": "long" },

         { "name": "endIndex", "type": "long" },

         {

          "name": "data",

          "type": { "type": "array", "items": "Energistics.Datatypes.ChannelData.DataItem" }

     }

     ]

}