You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: producer_impl.go
    path of file: ./repos/milvus/internal/mq/mqimpl/rocksmq/client
    
    the code of the file until where you have to start completion: // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/
    
func (p *producer) Send(message *mqwrapper.ProducerMessage) (UniqueID, error) {
	// NOTICE: this is the hack.
	// we should not unmarshal the payload here but we can not extend the payload byte
	payload := message.Payload
	header, err := UnmarshalHeader(message.Payload)
	if err == nil && header != nil && header.Base != nil {
		// try to marshal properties into message if message is real message
		header.Base.Properties = message.Properties
		payload, err = MarshalHeader(header)
		if err != nil {
			return 0, err
		}
	}

	ids, err := p.c.server.Produce(p.topic, []server.ProducerMessage{
		{
			Payload: payload,
		},
	})
	if err != nil {
		return 0, err
	}
	return ids[0], nil
}