Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

timestamp is "-1" #230

Closed
icepigss opened this issue Jul 24, 2018 · 1 comment
Closed

timestamp is "-1" #230

icepigss opened this issue Jul 24, 2018 · 1 comment

Comments

@icepigss
Copy link

$config = \Kafka\ProducerConfig::getInstance();
$config->setMetadataRefreshIntervalMs(10000);
$config->setMetadataBrokerList($hostsList);
$config->setBrokerVersion('1.0.0');
$config->setRequiredAck(1);
$config->setClientId($clientId ?: 'kafka-php');
$config->setProduceInterval(500);
$this->_producer = new \Kafka\Producer();

$ret = $this->_producer->send([ [ 'topic' => 'hello, 'value' => $data, 'key' => ''] ]);

I don't know where something went wrong.
I got my message but it's field "timestamp" is "-1".

@pravinkucha
Copy link

explicitly pass message timestamp

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants