// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
{
"name": "SubscriptionInfoData",
"validVersions": "1-11",
"flexibleVersions": "none",
"fields": [
{
"name": "version",
"versions": "1+",
"type": "int32",
"about": "The version of the subscription info data."
},
{
"name": "latestSupportedVersion",
"versions": "3+",
"default": "-1",
"type": "int32",
"about": "The latest supported version of the subscription info data."
},
{
"name": "processId",
"versions": "1+",
"type": "uuid",
"about": "The process id of the client that sent the request."
},
/***** Protocol version 1-6 only (after 6 this is encoded in task offset sum map) *****/
{
"name": "prevTasks",
"versions": "1-6",
"type": "[]TaskId",
"about": "The previous tasks that were assigned to the client."
},
{
"name": "standbyTasks",
"versions": "1-6",
"type": "[]TaskId",
"about": "The standby tasks that were assigned to the client."
},
/***************/
{
"name": "userEndPoint",
"versions": "2+",
"type": "bytes",
"about": "The user end point of the client that sent the request."
},
{
"name": "taskOffsetSums",
"versions": "7+",
"type": "[]TaskOffsetSum",
"about": "The task offset sums that were assigned to the client."
},
{
"name": "uniqueField",
"versions": "8+",
"type": "int8",
"about": "A unique field that is used to identify the client that sent the request."
},
{
"name": "errorCode",
"versions": "9+",
"type": "int32",
"about": "The error code of the request."
},
{
"name": "clientTags",
"versions": "11+",
"type": "[]ClientTag",
"about": "The client tags that were assigned to the client."
}
],
"commonStructs": [
// TaskId was only used from 1-6, after 6 we encode each field of the TaskId separately along with the other information for that map entry
{
"name": "TaskId",
"versions": "1-6",
"fields": [
{
"name": "topicGroupId",
"versions": "1-6",
"type": "int32",
"about": "The topic group id of the task."
},
{
"name": "partition",
"versions": "1-6",
"type": "int32",
"about": "The partition of the task."
}
]
},
{
"name": "TaskOffsetSum",
"versions": "7+",
"fields": [
{
"name": "topicGroupId",
"versions": "7+",
"type": "int32",
"about": "The topic group id of the task."
},
// Prior to version 10, in 7-9, the below fields (partition and offsetSum) were encoded via the nested
// partitionToOffsetSum struct. In 10+ all fields are encoded directly in the TaskOffsetSum struct
{
"name": "partition",
"versions": "10+",
"type": "int32",
"about": "The partition of the task."
},
{
"name": "offsetSum",
"versions": "10+",
"type": "int64",
"about": "The offset sum of the task."
},
{
"name": "namedTopology",
"versions": "10+",
"nullableVersions": "10+",
"ignorable": "false", // namedTopology is not ignorable because if you do, a TaskId may not be unique
"type": "string",
"about": "The named topology of the task."
},
{
"name": "partitionToOffsetSum",
"versions": "7-9",
"type": "[]PartitionToOffsetSum",
"about": "The partition to offset sum of the task."
}
]
},
{
"name": "PartitionToOffsetSum",
"versions": "7-9",
"fields": [
{
"name": "partition",
"versions": "7-9",
"type": "int32",
"about": "The partition of the task."
},
{
"name": "offsetSum",
"versions": "7-9",
"type": "int64",
"about": "The offset sum of the task."
}
]
},
{
"name": "ClientTag",
"versions": "11+",
"fields": [
{
"name": "key",
"versions": "11+",
"type": "bytes",
"about": "The key of the client tag."
},
{
"name": "value",
"versions": "11+",
"type": "bytes",
"about": "The value of the client tag."
}
]
}
],
"type": "data"
}