DWQA QuestionsCategory: Artificial IntelligencePHP operation Kafka problem
hanweimin asked 3 months ago

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.

[10060])

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

The wind is blowing replied 3 months ago

150 stop why error 151 can’t be connected? Listening error, just reconnect

The wind is blowing replied 3 months ago

Now the test situation is like this. PHP listens for consumption, then a broker hangs up, and the client directly exits here

The wind is blowing replied 3 months ago

Not like the server, one is hung up, and the other two can operate normally

1 Answers
Why don't you go to jiuxiao answered 3 months ago

You can get a daemon, or the client can do exception handling