1

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

2 Answers 2

0

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.
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. But I need function like java API AcknowledgementSupport.settle in python.
0

Note that NACK support has now been added to PubSub+ Python API since 1.9. The consuming application can issue a settle(Outcome.FAILED) and the message will go back to the queue and be made available for resend.

However, there is no delayed redelivery option: the message will be resent as soon as possible (depending on your consumer's configured sub AD window size). To implement a delayed redelivery mechanism, you'd have to do it yourself in your app... e.g. place the message in some data structure, and kick off a timer to NACK the message after 30 seconds. If the app crashes during this time, the message will still get delivered to the next available consumer (since it was never ACKed in the first place).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.