TsgcWSPClient_Kafka › Events › OnKafkaConnect
Fires after the client connects to the broker.
property OnKafkaConnect: TsgcKafkaConnectEvent;
// procedure(Sender: TObject) of object
—
This is a good place to Subscribe to topics or create topics, because at this point the client is connected to the broker and ready to issue requests.
procedure TForm1.KafkaConnect(Sender: TObject);
begin
oKafka.Subscribe(['my-topic']);
end;