Skip to content

Java SDK: expose deleteConsumerOffset #4330

Description

@justinmclean

The Rust client has ConsumerOffsetClient::delete_consumer_offset (core/common/src/traits/consumer_offset_client.rs). The Java SDK has storeConsumerOffset and getConsumerOffset, but not delete.

What to do

  • Add DELETE(122) to the ConsumerOffset enum in serde/CommandCode.java. The VSR operation is already mapped in VsrOperation.java.
  • Add deleteConsumerOffset to the blocking and async ConsumerOffsetsClient interfaces, with the same arguments as getConsumerOffset and no return value.
  • Implement it in the TCP clients (client/async/tcp/ConsumerOffsetsTcpClient.java, client/blocking/tcp/ConsumerOffsetsTcpClient.java) and the HTTP client (client/blocking/http/ConsumerOffsetsHttpClient.java), following getConsumerOffset.
  • Add a test to ConsumerOffsetsClientBaseTest.java that stores an offset, deletes it, and checks that getConsumerOffset then returns empty. The base test runs for both TCP and HTTP.

Done when

The new test passes for both the TCP and HTTP clients.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersjavaIssues related to Java SDK

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions