TsgcWSPClient_Kafka › Methods › Produce
Publishes a string record to a topic.
procedure Produce(const aTopic: string; const aValue: string; const aKey: string = ''; aPartition: Integer = -1);
Sends a single string record to the broker. When a key is supplied it is used to route the record to a partition; when the key is empty and the partition is -1, the record is written to the default partition. Use ProduceBytes for binary payloads or ProduceMessages to send a batch of records in one request.
oKafka.Produce('my-topic', 'Hello Kafka', 'key-1');