@UriParams
public class MQTTConfiguration
extends org.fusesource.mqtt.client.MQTT
Modifier and Type | Field and Description |
---|---|
static String |
MQTT_PUBLISH_TOPIC |
static String |
MQTT_SUBSCRIBE_TOPIC |
Constructor and Description |
---|
MQTTConfiguration() |
Modifier and Type | Method and Description |
---|---|
Executor |
getBlockingExecutor() |
long |
getConnectAttemptsMax() |
int |
getConnectWaitInSeconds() |
int |
getDisconnectWaitInSeconds() |
org.fusesource.hawtdispatch.DispatchQueue |
getDispatchQueue() |
URI |
getHost() |
URI |
getLocalAddress() |
int |
getMaxReadRate() |
int |
getMaxWriteRate() |
String |
getMqttQosPropertyName() |
String |
getMqttRetainPropertyName() |
String |
getMqttTopicPropertyName()
Deprecated.
|
String |
getPublishTopicName() |
org.fusesource.mqtt.client.QoS |
getQoS() |
String |
getQualityOfService() |
int |
getReceiveBufferSize() |
long |
getReconnectAttemptsMax() |
double |
getReconnectBackOffMultiplier() |
long |
getReconnectDelay() |
long |
getReconnectDelayMax() |
int |
getSendBufferSize() |
int |
getSendWaitInSeconds() |
SSLContext |
getSslContext() |
String |
getSubscribeTopicName()
Deprecated.
|
String |
getSubscribeTopicNames() |
int |
getTrafficClass() |
String |
getVersion() |
boolean |
isByDefaultRetain() |
boolean |
isLazySessionCreation() |
void |
setBlockingExecutor(Executor blockingExecutor)
SSL connections perform blocking operations against internal thread pool unless you call the setBlockingExecutor method to configure that executor they will use instead.
|
void |
setByDefaultRetain(boolean byDefaultRetain)
The default retain policy to be used on messages sent to the MQTT broker
|
void |
setCleanSession(boolean cleanSession)
Set to false if you want the MQTT server to persist topic subscriptions and ack positions across client sessions.
|
void |
setClientId(String clientId)
Use to set the client Id of the session.
|
void |
setConnectAttemptsMax(long connectAttemptsMax)
The maximum number of reconnect attempts before an error is reported back to the client on the first attempt
by the client to connect to a server.
|
void |
setConnectWaitInSeconds(int connectWaitInSeconds)
Delay in seconds the Component will wait for a connection to be established to the MQTT broker
|
void |
setDisconnectWaitInSeconds(int disconnectWaitInSeconds)
The number of seconds the Component will wait for a valid disconnect on stop() from the MQTT broker
|
void |
setDispatchQueue(org.fusesource.hawtdispatch.DispatchQueue dispatchQueue)
A HawtDispatch dispatch queue is used to synchronize access to the connection.
|
void |
setHost(String host)
The URI of the MQTT broker to connect too - this component also supports SSL - e.g.
|
void |
setHost(URI host)
The URI of the MQTT broker to connect too - this component also supports SSL - e.g.
|
void |
setKeepAlive(short keepAlive)
Configures the Keep Alive timer in seconds.
|
void |
setLazySessionCreation(boolean lazySessionCreation)
Sessions can be lazily created to avoid exceptions, if the remote server is not up and running when the Camel producer is started.
|
void |
setLocalAddress(String localAddress)
The local InetAddress and port to use
|
void |
setLocalAddress(URI localAddress) |
void |
setMaxReadRate(int maxReadRate)
Sets the maximum bytes per second that this transport will receive data at.
|
void |
setMaxWriteRate(int maxWriteRate)
Sets the maximum bytes per second that this transport will send data at.
|
void |
setMqttQosPropertyName(String mqttQosPropertyName)
The property name to look for on an Exchange for an individual published message.
|
void |
setMqttRetainPropertyName(String mqttRetainPropertyName)
The property name to look for on an Exchange for an individual published message.
|
void |
setMqttTopicPropertyName(String mqttTopicPropertyName)
Deprecated.
|
void |
setPassword(String password)
Password to be used for authentication against the MQTT broker
|
void |
setPublishTopicName(String publishTopicName)
The default Topic to publish messages on
|
void |
setQualityOfService(String qualityOfService)
Quality of service level to use for topics.
|
void |
setReceiveBufferSize(int receiveBufferSize)
Sets the size of the internal socket receive buffer.
|
void |
setReconnectAttemptsMax(long reconnectAttemptsMax)
The maximum number of reconnect attempts before an error is reported back to the client after a server
connection had previously been established.
|
void |
setReconnectBackOffMultiplier(double reconnectBackOffMultiplier)
The Exponential backoff be used between reconnect attempts.
|
void |
setReconnectDelay(long reconnectDelay)
How long to wait in ms before the first reconnect attempt.
|
void |
setReconnectDelayMax(long reconnectDelayMax)
The maximum amount of time in ms to wait between reconnect attempts.
|
void |
setSendBufferSize(int sendBufferSize)
Sets the size of the internal socket send buffer.
|
void |
setSendWaitInSeconds(int sendWaitInSeconds)
The maximum time the Component will wait for a receipt from the MQTT broker to acknowledge a published message before throwing an exception
|
void |
setSslContext(SSLContext sslContext)
To configure security using SSLContext configuration
|
void |
setSubscribeTopicName(String subscribeTopicName)
Deprecated.
|
void |
setSubscribeTopicNames(String subscribeTopicNames)
A comma-delimited list of Topics to subscribe to for messages.
|
void |
setTrafficClass(int trafficClass)
Sets traffic class or type-of-service octet in the IP header for packets sent from the transport.
|
void |
setUserName(String userName)
Username to be used for authentication against the MQTT broker
|
void |
setVersion(String version)
Set to 3.1.1 to use MQTT version 3.1.1.
|
void |
setWillMessage(String willMessage)
The Will message to send.
|
void |
setWillQos(org.fusesource.mqtt.client.QoS willQos)
Sets the quality of service to use for the Will message.
|
void |
setWillRetain(boolean willRetain)
Set to true if you want the Will to be published with the retain option.
|
void |
setWillTopic(String willTopic)
If set the server will publish the client's Will message to the specified topics if the client has an unexpected disconnection.
|
blockingConnection, callbackConnection, futureConnection, getBlockingThreadPool, getClientId, getKeepAlive, getPassword, getTracer, getType, getUserName, getWillMessage, getWillQos, getWillTopic, isCleanSession, isUseLocalHost, isWillRetain, setBlockingThreadPool, setClientId, setHost, setPassword, setTracer, setUseLocalHost, setUserName, setWillMessage, setWillTopic
public static final String MQTT_SUBSCRIBE_TOPIC
public static final String MQTT_PUBLISH_TOPIC
public String getQualityOfService()
public void setQualityOfService(String qualityOfService)
public org.fusesource.mqtt.client.QoS getQoS()
@Deprecated public String getSubscribeTopicName()
@Deprecated public void setSubscribeTopicName(String subscribeTopicName)
public String getSubscribeTopicNames()
public void setSubscribeTopicNames(String subscribeTopicNames)
public String getPublishTopicName()
public void setPublishTopicName(String publishTopicName)
@Deprecated public String getMqttTopicPropertyName()
@Deprecated public void setMqttTopicPropertyName(String mqttTopicPropertyName)
public String getMqttRetainPropertyName()
public void setMqttRetainPropertyName(String mqttRetainPropertyName)
public String getMqttQosPropertyName()
public void setMqttQosPropertyName(String mqttQosPropertyName)
public int getConnectWaitInSeconds()
public void setConnectWaitInSeconds(int connectWaitInSeconds)
public int getDisconnectWaitInSeconds()
public void setDisconnectWaitInSeconds(int disconnectWaitInSeconds)
public int getSendWaitInSeconds()
public void setSendWaitInSeconds(int sendWaitInSeconds)
public boolean isByDefaultRetain()
public void setByDefaultRetain(boolean byDefaultRetain)
public void setClientId(String clientId)
setClientId
in class org.fusesource.mqtt.client.MQTT
public void setCleanSession(boolean cleanSession)
setCleanSession
in class org.fusesource.mqtt.client.MQTT
public void setKeepAlive(short keepAlive)
setKeepAlive
in class org.fusesource.mqtt.client.MQTT
public void setPassword(String password)
setPassword
in class org.fusesource.mqtt.client.MQTT
public void setUserName(String userName)
setUserName
in class org.fusesource.mqtt.client.MQTT
public void setWillMessage(String willMessage)
setWillMessage
in class org.fusesource.mqtt.client.MQTT
public void setWillQos(org.fusesource.mqtt.client.QoS willQos)
setWillQos
in class org.fusesource.mqtt.client.MQTT
public void setVersion(String version)
setVersion
in class org.fusesource.mqtt.client.MQTT
public String getVersion()
getVersion
in class org.fusesource.mqtt.client.MQTT
public void setWillRetain(boolean willRetain)
setWillRetain
in class org.fusesource.mqtt.client.MQTT
public void setWillTopic(String willTopic)
setWillTopic
in class org.fusesource.mqtt.client.MQTT
public Executor getBlockingExecutor()
getBlockingExecutor
in class org.fusesource.mqtt.client.MQTT
public void setBlockingExecutor(Executor blockingExecutor)
setBlockingExecutor
in class org.fusesource.mqtt.client.MQTT
public org.fusesource.hawtdispatch.DispatchQueue getDispatchQueue()
getDispatchQueue
in class org.fusesource.mqtt.client.MQTT
public void setDispatchQueue(org.fusesource.hawtdispatch.DispatchQueue dispatchQueue)
setDispatchQueue
in class org.fusesource.mqtt.client.MQTT
public URI getLocalAddress()
getLocalAddress
in class org.fusesource.mqtt.client.MQTT
public void setLocalAddress(String localAddress) throws URISyntaxException
setLocalAddress
in class org.fusesource.mqtt.client.MQTT
URISyntaxException
public void setLocalAddress(URI localAddress)
setLocalAddress
in class org.fusesource.mqtt.client.MQTT
public int getMaxReadRate()
getMaxReadRate
in class org.fusesource.mqtt.client.MQTT
public void setMaxReadRate(int maxReadRate)
setMaxReadRate
in class org.fusesource.mqtt.client.MQTT
public int getMaxWriteRate()
getMaxWriteRate
in class org.fusesource.mqtt.client.MQTT
public void setMaxWriteRate(int maxWriteRate)
setMaxWriteRate
in class org.fusesource.mqtt.client.MQTT
public int getReceiveBufferSize()
getReceiveBufferSize
in class org.fusesource.mqtt.client.MQTT
public void setReceiveBufferSize(int receiveBufferSize)
setReceiveBufferSize
in class org.fusesource.mqtt.client.MQTT
public URI getHost()
getHost
in class org.fusesource.mqtt.client.MQTT
public void setHost(String host) throws URISyntaxException
setHost
in class org.fusesource.mqtt.client.MQTT
URISyntaxException
public void setHost(URI host)
setHost
in class org.fusesource.mqtt.client.MQTT
public int getSendBufferSize()
getSendBufferSize
in class org.fusesource.mqtt.client.MQTT
public void setSendBufferSize(int sendBufferSize)
setSendBufferSize
in class org.fusesource.mqtt.client.MQTT
public SSLContext getSslContext()
getSslContext
in class org.fusesource.mqtt.client.MQTT
public void setSslContext(SSLContext sslContext)
setSslContext
in class org.fusesource.mqtt.client.MQTT
public int getTrafficClass()
getTrafficClass
in class org.fusesource.mqtt.client.MQTT
public void setTrafficClass(int trafficClass)
setTrafficClass
in class org.fusesource.mqtt.client.MQTT
public long getConnectAttemptsMax()
getConnectAttemptsMax
in class org.fusesource.mqtt.client.MQTT
public void setConnectAttemptsMax(long connectAttemptsMax)
setConnectAttemptsMax
in class org.fusesource.mqtt.client.MQTT
public long getReconnectAttemptsMax()
getReconnectAttemptsMax
in class org.fusesource.mqtt.client.MQTT
public void setReconnectAttemptsMax(long reconnectAttemptsMax)
setReconnectAttemptsMax
in class org.fusesource.mqtt.client.MQTT
public double getReconnectBackOffMultiplier()
getReconnectBackOffMultiplier
in class org.fusesource.mqtt.client.MQTT
public void setReconnectBackOffMultiplier(double reconnectBackOffMultiplier)
setReconnectBackOffMultiplier
in class org.fusesource.mqtt.client.MQTT
public long getReconnectDelay()
getReconnectDelay
in class org.fusesource.mqtt.client.MQTT
public void setReconnectDelay(long reconnectDelay)
setReconnectDelay
in class org.fusesource.mqtt.client.MQTT
public long getReconnectDelayMax()
getReconnectDelayMax
in class org.fusesource.mqtt.client.MQTT
public void setReconnectDelayMax(long reconnectDelayMax)
setReconnectDelayMax
in class org.fusesource.mqtt.client.MQTT
public boolean isLazySessionCreation()
public void setLazySessionCreation(boolean lazySessionCreation)
Apache Camel