BewareMyPower commented on PR #25922:
URL: https://github.com/apache/pulsar/pull/25922#issuecomment-4618407522
@lhotari In my use case, checking if the created cursor is non-durable might
not work.
In the downstream protocol handler implementation, an internal subscription
could be created like
```java
final var subscription =
topic.getSubscriptions().computeIfAbsent(subName,
__ -> new MockStatsPersistentSubscription(topic, subName));
```
```java
public MockStatsPersistentSubscription(PersistentTopic topic, String
subscriptionName) {
super(topic, subscriptionName, new MockManagedCursor(), false);
```
where many methods are overwritten for special use. The `MockManagedCursor`
is also durable to prevent a new subscription with the same name from being
created.
In this case, the created cursor will still be durable but I also want to
prevent the subscription creation.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]