The community forums are in BETA and closed to the public.

Subscribe callback

How to pass the channel information to subscribe callback?

There are three optional parameters to the subscribe message callback: message, envelope and channel. Here is an example of how to use these three parameters.

    channel: 'channel1'
    message: function(msg, env, ch) {
        console.log("channel: " + ch + 
            "; envelope: " + env + 
            "; message: " + JSON.stringify(msg));

Login or Signup to post a comment