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.
The Rust client has
StreamClient::purge_streamandTopicClient::purge_topic(core/common/src/traits/stream_client.rsandtopic_client.rs), but the Java SDK has neither. Purging clears the messages and keeps the stream or topic. The command codes are already defined inVsrOperation.javaandCommandCode.java.What to do
purgeStream(StreamId)to the blocking and asyncStreamsClientinterfaces, 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).deleteStreamis the model to copy.purgeTopic(StreamId, TopicId)the same way to theTopicsClientinterfaces and their TCP and HTTP clients, copyingdeleteTopic.Done when
purgeStreamandpurgeTopicleave the stream or topic in place with no messages against a running server, and the new tests pass.