When the client uses php to consume Kafka,In view of the online example: $config – > setmetadatabrokerlist (‘192.168.30.150:9092192.168.30.151:9092192.168.30.152:9092 ‘);I tried to stop Kafka above 150. As a result, the client listens to the consumption code and exits directly:
Could not connect to 192.168.30.151:9092
The connected host did not respond, and the connection attempt failed.
How to solve this problem?Expectation: there are three services running. After one service stops running, the client should also run normally,You can get a daemon, or the client can do exception handling
150 stop why error 151 can’t be connected? Listening error, just reconnect
Now the test situation is like this. PHP listens for consumption, then a broker hangs up, and the client directly exits here
Not like the server, one is hung up, and the other two can operate normally