Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2203

Redis Connection Loss and Counter Value

$
0
0

I have a worker application , which consumes messages from queue and update(INCRBY) the successfully processed message count , failed message count to Redis, using lettuce library

I want this counter to be accurate. And on checking about the connection failure , i found this link

I can opt for at-most-once consistency level to avoid single command getting executed more than once.

But my question is, as mention in the link, the connection failure can happen even aft the command got executed successfully( counts in Redis servers are updated) but before getting the response back to client.

In this case my application have no clue , whether the counts are incremented or not.

How to handle this scenario ? and how to have accurate counts?


Viewing all articles
Browse latest Browse all 2203

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>