Class MQTTProtocolConverter

java.lang.Object
org.apache.activemq.transport.mqtt.MQTTProtocolConverter

public class MQTTProtocolConverter extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • sendToActiveMQ

      public void sendToActiveMQ(org.apache.activemq.command.Command command, ResponseHandler handler)
    • 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

      public void onActiveMQCommand(org.apache.activemq.command.Command command) throws Exception
      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

      public MQTTTransport 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

      public MQTTPacketIdGenerator 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

      public String getSubscriptionStrategy()
    • setSubscriptionStrategy

      public void setSubscriptionStrategy(String name)
    • getClientId

      public String getClientId()
    • containsMqttWildcard

      protected boolean containsMqttWildcard(String value)
    • findSubscriptionStrategy

      protected MQTTSubscriptionStrategy findSubscriptionStrategy() throws IOException
      Throws:
      IOException
    • setSubsciptionStrategy

      public void setSubsciptionStrategy(MQTTSubscriptionStrategy subsciptionStrategy)