Is there any way we can detect crash or shut down of consumer? I want that kafka server publish event when mentioned situation to all kafka clients (publishers, consumers....). Is it possible?
Asked
Active
Viewed 665 times
2
-
Please provide enough code so others can better understand or reproduce the problem. – Community Aug 01 '22 at 14:06
1 Answers
0
Kafka keeps track of the consumed offsets per consumer on special internal topics. You could setup a special "monitoring service", have that constantly consuming from those offset internal topics, and trigger any notification/alerting mechanisms as needed so that your publishers and other consumers are notified programatically. This other SO question has more details about that.
Depending on your use case, lag monitoring is also a really good way to know if your consumers are falling behind and/or crashed. There's multiple solutions for that out there, or again, you could build your own to customize alerting/notification behavior.

mjuarez
- 16,372
- 11
- 56
- 73