code: function AzureEventHubNode(config) {
          // Store node for further use
          var node = this;
          backupnode = node;
          //nodeConfig = config;
  
          // Create the Node-RED node
          RED.nodes.createNode(this, config);
          node.on('input', function (msg) {
  
              var messageJSON = null;
  
              if (typeof (msg.payload) != "string") {
                  node.log("JSON");
                  messageJSON = msg.payload;
              } else {
                  node.log("String");
                  //Converting string to JSON Object
                  //Sample string: {connectionString: "cs", eventPath: "/message", "deviceId": "name", "key": "jsadhjahdue7230-=13", "protocol": "amqp", "data": "25"}
                  messageJSON = JSON.parse(msg.payload);
              }
  
              // Sending data to Azure Event Hub Hub
              sendMessageToEventHub(node, messageJSON.connectionString, messageJSON.eventPath, messageJSON.data);
          });
  
          node.on('close', function () {
              disconnectFromEventHub(node, this);
          });
  
      }
docs: Main function called by Node-RED