function resolve(opt) {
	if (isObject(opt) && isInheritedClass(opt, Transporters.Base)) {
		return opt;
	} else if (isString(opt)) {
		let TransporterClass = getByName(opt);
		if (TransporterClass) return new TransporterClass();

		if (opt.startsWith("nats://")) TransporterClass = Transporters.NATS;
		else if (opt.startsWith("mqtt://") || opt.startsWith("mqtts://"))
			TransporterClass = Transporters.MQTT;
		else if (opt.startsWith("redis://") || opt.startsWith("rediss://"))
			TransporterClass = Transporters.Redis;
		else if (opt.startsWith("amqp://") || opt.startsWith("amqps://"))
			TransporterClass = Transporters.AMQP;
		else if (opt.startsWith("amqp10://")) TransporterClass = Transporters.AMQP10;
		else if (opt.startsWith("kafka://")) TransporterClass = Transporters.Kafka;
		else if (opt.startsWith("stan://")) TransporterClass = Transporters.STAN;
		else if (opt.startsWith("tcp://")) TransporterClass = Transporters.TCP;

		if (TransporterClass) return new TransporterClass(opt);
		else throw new BrokerOptionsError(`Invalid transporter type '${opt}'.`, { type: opt });
	} else if (isObject(opt)) {
		let TransporterClass = getByName(opt.type || "NATS");

		if (TransporterClass) return new TransporterClass(opt.options);
		else
			throw new BrokerOptionsError(`Invalid transporter type '${opt.type}'.`, {
				type: opt.type
			});
	}

	return null;
}
Resolve transporter by name

@param {object|string} opt
@returns {Transporter}