code: func NewMQTT2To3Backend(conf config.Config) (*MQTT2To3Backend, error) {
  	c := conf.NetworkServer.Gateway.Backend.MQTT
  
  	b := MQTT2To3Backend{}
  
  	opts := mqtt.NewClientOptions()
  	opts.AddBroker(c.Server)
  	opts.SetUsername(c.Username)
  	opts.SetPassword(c.Password)
  	opts.SetCleanSession(c.CleanSession)
  	opts.SetClientID(c.ClientID)
  	opts.SetOnConnectHandler(b.onConnected)
  
  	tlsconfig, err := newTLSConfig(c.CACert, c.TLSCert, c.TLSKey)
  	if err != nil {
  		log.WithError(err).WithFields(log.Fields{
  			"ca_cert":  c.CACert,
  			"tls_cert": c.TLSCert,
  			"tls_key":  c.TLSKey,
  		}).Fatal("mqtt2to3: error loading mqtt certificate files")
  	}
  	if tlsconfig != nil {
  		opts.SetTLSConfig(tlsconfig)
  	}
  
  	log.WithField("broker", c.Server).Info("mqtt2to3: connecting to mqtt broker")
  	b.conn = mqtt.NewClient(opts)
  
  	for {
  		if token := b.conn.Connect(); token.Wait() && token.Error() != nil {
  			log.WithError(err).Error("mqtt2to3: connecting to mqtt broker failed")
  			time.Sleep(2 * time.Second)
  		} else {
  			break
  		}
  	}
  
  	return &b, nil
  }
docs: // NewMQTT2To3Backend creates a new Backend.