Class MQTTProtocolConverter
java.lang.Object
org.apache.activemq.transport.mqtt.MQTTProtocolConverter
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMQTTProtocolConverter
(MQTTTransport mqttTransport, BrokerService brokerService) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
containsMqttWildcard
(String value) org.fusesource.mqtt.codec.PUBLISH
convertMessage
(org.apache.activemq.command.ActiveMQMessage message) protected MQTTSubscriptionStrategy
int
org.apache.activemq.command.ConnectionId
long
boolean
org.apache.activemq.command.SessionId
boolean
void
onActiveMQCommand
(org.apache.activemq.command.Command command) Dispatch an ActiveMQ commandvoid
onMQTTCommand
(org.fusesource.mqtt.codec.MQTTFrame frame) Convert a MQTT commandvoid
void
onUnSubscribe
(org.fusesource.mqtt.codec.UNSUBSCRIBE command) void
sendToActiveMQ
(org.apache.activemq.command.Command command, ResponseHandler handler) void
setActiveMQSubscriptionPrefetch
(int activeMQSubscriptionPrefetch) set the default prefetch size when mapping the MQTT subscription to an ActiveMQ one The default = 1void
setDefaultKeepAlive
(long keepAlive) Set the default keep alive time (in milliseconds) that would be used if configured on server side and the client sends a keep-alive value of 0 (zero) on a CONNECT framevoid
setPublishDollarTopics
(boolean publishDollarTopics) void
setSubsciptionStrategy
(MQTTSubscriptionStrategy subsciptionStrategy) void
-
Field Details
-
QOS_PROPERTY_NAME
- See Also:
-
V3_1
public static final int V3_1- See Also:
-
V3_1_1
public static final int V3_1_1- See Also:
-
SINGLE_LEVEL_WILDCARD
- See Also:
-
MULTI_LEVEL_WILDCARD
- See Also:
-
version
public int version
-
-
Constructor Details
-
MQTTProtocolConverter
-
-
Method Details
-
sendToActiveMQ
-
onMQTTCommand
public void onMQTTCommand(org.fusesource.mqtt.codec.MQTTFrame frame) throws IOException, jakarta.jms.JMSException Convert a MQTT command- Throws:
IOException
jakarta.jms.JMSException
-
onUnSubscribe
public void onUnSubscribe(org.fusesource.mqtt.codec.UNSUBSCRIBE command) throws MQTTProtocolException - Throws:
MQTTProtocolException
-
onActiveMQCommand
Dispatch an ActiveMQ command- Throws:
Exception
-
convertMessage
public org.fusesource.mqtt.codec.PUBLISH convertMessage(org.apache.activemq.command.ActiveMQMessage message) throws IOException, jakarta.jms.JMSException, DataFormatException - Throws:
IOException
jakarta.jms.JMSException
DataFormatException
-
getMQTTTransport
-
onTransportError
public void onTransportError() -
getDefaultKeepAlive
public long getDefaultKeepAlive() -
setDefaultKeepAlive
public void setDefaultKeepAlive(long keepAlive) Set the default keep alive time (in milliseconds) that would be used if configured on server side and the client sends a keep-alive value of 0 (zero) on a CONNECT frame- Parameters:
keepAlive
- the keepAlive in milliseconds
-
getActiveMQSubscriptionPrefetch
public int getActiveMQSubscriptionPrefetch() -
setActiveMQSubscriptionPrefetch
public void setActiveMQSubscriptionPrefetch(int activeMQSubscriptionPrefetch) set the default prefetch size when mapping the MQTT subscription to an ActiveMQ one The default = 1- Parameters:
activeMQSubscriptionPrefetch
- set the prefetch for the corresponding ActiveMQ subscription
-
getPacketIdGenerator
-
setPublishDollarTopics
public void setPublishDollarTopics(boolean publishDollarTopics) -
getPublishDollarTopics
public boolean getPublishDollarTopics() -
getConnectionId
public org.apache.activemq.command.ConnectionId getConnectionId() -
getSessionId
public org.apache.activemq.command.SessionId getSessionId() -
isCleanSession
public boolean isCleanSession() -
getSubscriptionStrategy
-
setSubscriptionStrategy
-
getClientId
-
containsMqttWildcard
-
findSubscriptionStrategy
- Throws:
IOException
-
setSubsciptionStrategy
-