I need to generate a channel key from the backend using emitter.
Library: https://github.com/emitter-io/go
// Create the client and connect to the broker
c, _ := emitter.Connect(host, func(_ *emitter.Client, msg emitter.Message) {
fmt.Printf("[emitter] -> [B] received: '%s' topic: '%s'\n", msg.Payload(), msg.Topic())
})
key2, err := c.GenerateKey(masterKey,newChannel, "rwls", ttl)
if err != nil {
panic(err)
}
fmt.Println(key2)
I am not getting any errors, but also not receiving any messages. Any idea what’s wrong here?