Skip to content

Java SDK: add purgeStream and purgeTopic #4329

Description

@justinmclean

The Rust client has StreamClient::purge_stream and TopicClient::purge_topic (core/common/src/traits/stream_client.rs and topic_client.rs), but the Java SDK has neither. Purging clears the messages and keeps the stream or topic. The command codes are already defined in VsrOperation.java and CommandCode.java.

What to do

  • Add purgeStream(StreamId) to the blocking and async StreamsClient interfaces, and implement it in the TCP clients (client/async/tcp/StreamsTcpClient.java, client/blocking/tcp/StreamsTcpClient.java) and the HTTP client (client/blocking/http/StreamsHttpClient.java). deleteStream is the model to copy.
  • Add purgeTopic(StreamId, TopicId) the same way to the TopicsClient interfaces and their TCP and HTTP clients, copying deleteTopic.
  • Add tests next to the existing stream and topic client tests.

Done when

purgeStream and purgeTopic leave the stream or topic in place with no messages against a running server, and the new tests pass.

Activity

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

Metadata

Metadata

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