How to unack message on failure in solace

19 views Asked by At

I want to unack message on failure and reprocess it after some time using solace-pubsubplus 1.6.0 python api.But I am not able to find such api in solace.

Can any one help me to solve this issue?

Thanks in advance

1

There are 1 answers

1
Mrc0113 On

If I'm understanding correctly your situation is that you received a message, acknowledged it and now you had some failure and want to "un" acknowledge it. With traditional messaging APIs that isn't an option. Once you acknowledge the message you are telling the broker "I acknowledge that I have successfully processed this message and you can remove it". The broker then removes it from your queue so the broker can't "un" acknowledge it and make it reappear.

My suggestions would be as follows:

  1. Don't acknowledge a message until it has been processed. You can use client/manual acknowledgements to do this from a different thread.
  2. If for some reason you can't do (1) then you should really think about the architecture of the consumer. Can it be split up with multiple messages in-between (choreography instead of orchestration)?
  3. If for some reason those things aren't possible maybe hop over to the https://solace.community and share more details around what you're trying to accomplish. There are a lot of Solace employees and customers there that might be able to make suggestions.