When I restart the consumer script, I always lose a piece of data
When I restart the consumer script, I always lose a piece of data。
I am seeing the same behavior. Also is there a way to control auto.commit for my consumer? Or reset my offset to retrieve from a specific point?
When I restart the consumer script, I always lose a piece of data。
When i restart the consumer, it does not subscribe to any message. What changes you made to subscribe messages after restart?
I am seeing the same behavior. Also is there a way to control auto.commit for my consumer? Or reset my offset to retrieve from a specific point?
I solved the problem.Set it like this.
$config->setOffsetReset('earliest'); $config->setBrokerVersion('1.0.0');
I guess it's the protocol version,Set it to 1.0.0,then solved the problem.
When I restart the consumer script, I always lose a piece of data。
When i restart the consumer, it does not subscribe to any message. What changes you made to subscribe messages after restart?
Because the message has been consumed.The producer needs to keep writing so that the consumer can receive the message