-
Notifications
You must be signed in to change notification settings - Fork 846
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[admin] Add consumer group bindings for KIP-88, 222, 518, 396 (parti…
…al) (#1981) * [admin] Add ListConsumerGroupOffsets and AlterConsumerGroupOffsets bindings * [admin] Add ListConsumerGroups and DescribeConsumerGroups bindings * Also deprecates the older ListGroups code * [admin] Add KIP-518 changes to List/Describe Consumer Groups Co-authored-by: Emanuele Sabellico <esabellico@confluent.io>
- Loading branch information
Showing
42 changed files
with
3,241 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/Confluent.Kafka/Admin/AlterConsumerGroupOffsetsException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright 2022 Confluent Inc. | ||
// | ||
// Licensed 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. | ||
// | ||
// Refer to LICENSE for more information. | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace Confluent.Kafka.Admin | ||
{ | ||
/// <summary> | ||
/// Represents an error that occured during altering consumer group offsets. | ||
/// </summary> | ||
public class AlterConsumerGroupOffsetsException : KafkaException | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of AlterConsumerGroupOffsetsException. | ||
/// </summary> | ||
/// <param name="results"> | ||
/// The result corresponding to all groups/partitions in the request | ||
/// (whether or not they were in error). At least one of these | ||
/// results will be in error. | ||
/// </param> | ||
public AlterConsumerGroupOffsetsException(List<AlterConsumerGroupOffsetsReport> results) | ||
: base(new Error(ErrorCode.Local_Partial, | ||
"An error occurred altering consumer group offsets, check individual result elements")) | ||
{ | ||
Results = results; | ||
} | ||
|
||
/// <summary> | ||
/// The result corresponding to all groups/partitions in the request | ||
/// (whether or not they were in error). At least one of these | ||
/// results will be in error. | ||
/// </summary> | ||
public List<AlterConsumerGroupOffsetsReport> Results { get; } | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/Confluent.Kafka/Admin/AlterConsumerGroupOffsetsOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright 2022 Confluent Inc. | ||
// | ||
// Licensed 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. | ||
// | ||
// Refer to LICENSE for more information. | ||
|
||
using System; | ||
|
||
namespace Confluent.Kafka.Admin | ||
{ | ||
/// <summary> | ||
/// Options for the "AdminClient.AlterConsumerGroupOffsetsAsync" method. | ||
/// </summary> | ||
public class AlterConsumerGroupOffsetsOptions | ||
{ | ||
/// <summary> | ||
/// The overall request timeout, including broker lookup, request | ||
/// transmission, operation time on broker, and response. If set | ||
/// to null, the default request timeout for the AdminClient will | ||
/// be used. | ||
/// | ||
/// Default: null | ||
/// </summary> | ||
public TimeSpan? RequestTimeout { get; set; } | ||
} | ||
} |
Oops, something went wrong.