kafka-php icon indicating copy to clipboard operation
kafka-php copied to clipboard

When I restart the consumer script, I always lose a piece of data

Open songkaiha opened this issue 6 years ago • 4 comments

When I restart the consumer script, I always lose a piece of data。

songkaiha avatar Mar 26 '19 08:03 songkaiha

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?

metaclassing avatar Apr 01 '19 16:04 metaclassing

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?

parveenbadoni avatar Mar 02 '20 11:03 parveenbadoni

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.

songkaiha avatar Mar 06 '20 09:03 songkaiha

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

songkaiha avatar Mar 06 '20 09:03 songkaiha