I am currently working on persistent subscription, and I had an issue where when I was processing all the events in a persistent subscription, I had an exception while processing an event.
I am not receiving this exception, because the library is receiving a StatusRuntimeException with status "CANCELLED", but the cause of that StatusRuntimeException was my underlying exception (In my case it was a deserialization exception).
I was wondering, wouldn't it be better to add pass the "cause" of cancellation to the PersistentSubscriptionListener? this way, as the consumer can decide what to do with that. In my case I could throw an exception or log the cause of cancellation.
Right now If the persistent subscription has an exception, I am blind to the issue.
Could this be added?
The class I am talking about is:
PersistentSubscriptionListener.java
Which is used by the SubscribePersistentSubscription.java
I am currently working on persistent subscription, and I had an issue where when I was processing all the events in a persistent subscription, I had an exception while processing an event.
I am not receiving this exception, because the library is receiving a StatusRuntimeException with status "CANCELLED", but the cause of that StatusRuntimeException was my underlying exception (In my case it was a deserialization exception).
I was wondering, wouldn't it be better to add pass the "cause" of cancellation to the PersistentSubscriptionListener? this way, as the consumer can decide what to do with that. In my case I could throw an exception or log the cause of cancellation.
Right now If the persistent subscription has an exception, I am blind to the issue.
Could this be added?
The class I am talking about is: PersistentSubscriptionListener.java
Which is used by the SubscribePersistentSubscription.java
Thank you