To subscribe to data you first need to establish your connection to the Kwwika service and then subscribe to the data you wish to receive updates for. You do this by identifying the topic using its name. var connection = kwwika.Service.connect({apiKey: "YOUR_API_KEY" } ); var subscription = connection.subscribe("/KWWIKA/EXAMPLES/CHAT", { topicUpdated: function(subscription, update) { // handle update }, topicError: function(subscription, update) { // handle error } }); |
