private ClientBroker.SendMessageRequestP2B createSendMessageRequest(Partition partition,
            Message message) {
        ClientBroker.SendMessageRequestP2B.Builder builder =
                ClientBroker.SendMessageRequestP2B.newBuilder();
        builder.setClientId(this.producerManager.getProducerId());
        builder.setTopicName(partition.getTopic());
        builder.setPartitionId(partition.getPartitionId());
        builder.setData(ByteString.copyFrom(encodePayload(message)));
        builder.setFlag(MessageFlagUtils.getFlag(message));
        builder.setSentAddr(this.producerManager.getProducerAddrId());
        builder.setCheckSum(-1);
        if (TStringUtils.isNotBlank(message.getMsgType())) {
            builder.setMsgType(message.getMsgType());
        }
        if (TStringUtils.isNotBlank(message.getMsgTime())) {
            builder.setMsgTime(message.getMsgTime());
        }
        builder = this.producerManager.setAuthorizedTokenInfo(builder);
        return builder.build();
    }
Check if the given topic accept publish message.

@param topic topic name
@return if accept message
@throws TubeClientException
inlong-tubemq/tubemq-client/src/main/java/org/apache/inlong/tubemq/client/producer/SimpleMessageProducer.java