Class MqttEntryPoint

java.lang.Object
org.chenile.mqtt.entry.MqttEntryPoint

public class MqttEntryPoint extends Object
The entry point that is invoked by the Mqtt subscriber when a message arrives at a topic. This translates the message into a service invocation. The return value from the service is either published back to a reply queue (if one is specified) or just discarded if none is specified. However, errors will be logged.
Author:
Raja Shankar Kolluru
  • Field Details

  • Constructor Details

    • MqttEntryPoint

      public MqttEntryPoint()
  • Method Details

    • process

      public void process(String topic, org.eclipse.paho.mqttv5.common.MqttMessage message) throws Exception
      The entry point for MQ-TT. It puts the message into the system and extracts the response which is logged. We support asynchronous messages at this point in time.
      Parameters:
      topic - the topic where the message was received
      message - the message that was received
      Throws:
      Exception - if there is a problem in processing the message
    • populateHeaders

      private void populateHeaders(org.eclipse.paho.mqttv5.common.MqttMessage message, ChenileExchange exchange)
    • makeExchange

      private ChenileExchange makeExchange(String topic)
      topic will be in the format /some/stuff/serviceName/operationName extract the service name and operation name from the topic
      Parameters:
      topic - the topic that received this message. Used to compute service and op name
      Returns:
      the exchange