         console.log("'com.example.oncounter' event received:", counter, value);
            }
            session.subscribe('com.example.oncounter', oncounter).then(
               function (sub) {
                  console.log('subscribed to topic');
               },
               function (err) {
                  console.log('failed to subscribe to topic', err);
               }
            );


            // PUBLISH an event every second
            //           
            counter = 0;
           