package com.iwunu.nbiot.lock.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import lombok.Getter;

@Component
@Getter
public class MqttCofigBean {
	@Value("${spring.mqtt.username}")
	private String username;

	@Value("${spring.mqtt.password}")
	private String password;

	@Value("${spring.mqtt.url}")
	private String hostUrl;

	@Value("${spring.mqtt.client.sid}")
	private String sclientId;
	
	@Value("${spring.mqtt.client.id}")
	private String clientId;
	
	@Value("${spring.mqtt.messageType}")
	private String messageType;

	@Value("${spring.mqtt.completionTimeout}")
	private int completionTimeout;// 连接超时

	@Value("${srping.mqtt.keepalive}")
	private int keepalive;// 连接数
	
	@Value("${spring.mqtt.send.topic.default}")
	private String defaultTopic;
	
	@Value("${spring.mqtt.send.topic}")
	private String sendTopic;

	public  String[]  getRTopics() {
		return sendTopic.split(",");
	}
	
}
