You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/08 04:57:48 UTC
[GitHub] [pulsar] sijie commented on a change in pull request #9514: Expire message by position.
sijie commented on a change in pull request #9514:
URL: https://github.com/apache/pulsar/pull/9514#discussion_r571780860
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/PersistentTopics.java
##########
@@ -462,7 +462,47 @@ public void expireTopicMessages(@Suspended final AsyncResponse asyncResponse,
@QueryParam("authoritative") @DefaultValue("false") boolean authoritative) {
try {
validateTopicName(property, cluster, namespace, encodedTopic);
- internalExpireMessages(asyncResponse, decode(encodedSubName), expireTimeInSeconds, authoritative);
+ internalExpireMessagesByTimestamp(asyncResponse, decode(encodedSubName),
+ expireTimeInSeconds, authoritative);
+ } catch (WebApplicationException wae) {
+ asyncResponse.resume(wae);
+ } catch (Exception e) {
+ asyncResponse.resume(new RestException(e));
+ }
+ }
+
+ @POST
+ @Path("/{tenant}/{namespace}/{topic}/subscription/{subName}/expireMessages")
Review comment:
If we are going to update the v1 reset API, we should follow the v1 pattern.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org