Competing consumers - Park and retry

Hi, I have 2 questions related to competing consumers

  1. Is it possible to configure the retry time ( i.e. when we send PersistentSubscriptionNakEventAction.Retry)? I see option to configure maximum number of retries but nothing that allows me to configure the time.

  2. How should I handle parked events that are replayed from UI? I do not see the events being sent back to the subscriber. I am using the .NET client.

Just to add for 2, I am trying to find a way to read the parked messages from the “parked message queue”.

If I subscribe to the parked stream, I get the parked events right away (which seems to defeat the purpose of parking and I assume I am doing something wrong).

you should not subscirbe to the parked message stream but tell the
subscription to replay parked messages.

Thanks.So when we tell the subscription to replay, where does it get sent? To the original stream? That was not happening...

The message doesn’t get moved to a different stream when you replay parked messages.

Instead, the messages in the parked queue will be sent through to the clients that are connected to the persistent subscription that originally parked them. The parked messages stream will then be truncated to remove the messages that have been replayed.

As for your first question: If you respond with NakAction.Retry, your message will be retried immediately. There is no timeout here.

Thanks for the response. I do not see that behavior. This is the code I am using. Whenever there is an exception, I park. I see the messages in parked stream. But when I go to competing consumers screen in the UI and select replay, I do not receive those events. Also the parked messages stream is not being truncated. Am I missing something in code?

I’ve run your code and there doesn’t seem to be anything wrong with it - my parked messages are replayed fine. Are you sure the messages aren’t failing the second time and are being parked again?

I have been able to get it working by restarting the event store !! I will see if I can replicate it again. In any case, thanks for the help.