func ValidateMessage()

in runtime/core/protocol/grpc/validator/validator.go [86:103]


func ValidateMessage(msg *pb.SimpleMessage) error {
	if msg.UniqueId == "" {
		return ErrMessageNoUID
	}
	if msg.ProducerGroup == "" {
		return ErrMessageNoPG
	}
	if msg.Topic == "" {
		return ErrMessageNoTopic
	}
	if msg.Content == "" {
		return ErrMessageNoContent
	}
	if msg.Ttl == "" {
		return ErrMessageNoTTL
	}
	return nil
}