func (t *Topic) Close() {
	oldQueueLen := C.int(0x7FFFFFFF)
	queueLen := C.rd_kafka_outq_len(t.client.handle)
	for queueLen > 0 && queueLen < oldQueueLen {
		C.rd_kafka_poll(t.client.handle, 1000)
		oldQueueLen = queueLen
		queueLen = C.rd_kafka_outq_len(t.client.handle)
	}
	if queueLen > 0 {
		Log.Printf("%d messages have been lost as the internal queue for %s could not be flushed", queueLen, t.name)
	}
	C.rd_kafka_topic_destroy(t.handle)
}
Close frees the internal handle and tries to flush the queue.
package librdkafka
import "C"
type Topic struct {
	handle *C.rd_kafka_topic_t
	client *Client
	name   string
}
func NewTopic(name string, config TopicConfig, client *Client) *Topic {
	return &Topic{
		handle: C.rd_kafka_topic_new(client.handle, C.CString(name), config.handle),
		client: client,
		name:   name,
	}
}