Each time my consumer/subscriber application is redeloyed, the messages are redelivered from the sta

surya amala
surya amala Member Posts: 3
edited March 2022 in PubSub+ Event Broker #1

Let us say I have received/ processed 18000 messages over subscriber/ consumer. The subscriber has been redeployed, now I see all the 18000 messages being sent across to the subscriber all over again. Why is this happening? My deployment model is a zero downtime RTF based

Answers

  • TomF
    TomF Member, Employee Posts: 406 Solace Employee

    Hi @surya amala, TL;DR: make sure you've acknowledged the messages.

    I'd need to know a little more detail about how you've deployed, but I'll take a guess that your consumer is binding to a queue to get the messages. When you say "redeployed" I'll take another guess that this is in an iPaaS like Mule.

    If those guesses are correct, what's happening is that when you re-deploy, the old version of your consumer is deleted and your new version deployed in its place. All the broker sees is the application disconnecting and re-connecting. The key point here is did your application tell the broker it had finished with the messages - that is, acknowledged them?

    If it didn't, the broker has to assume your application failed before it had finished with the messages, in which case the only safe thing to do is re-send the messages to ensure they are properly and completely processed. Your application has to tell the broker it has finished with the messages, and the way it does that is to acknowledge them.