Giter Club home page Giter Club logo

Comments (6)

Florimond avatar Florimond commented on September 4, 2024

Could you post how you generate the key, and how do you subscribe?

from emitter.

snaquaye avatar snaquaye commented on September 4, 2024

I generate the key from myipaddress:8080/keygen and use the following code for subscription

const subscriptionList = [
  `${process.env.EMITTER_CHANNEL}/oauth-server/user_registered`
];

const client = emitter.connect({
    host: process.env.EMITTER_HOST,
    port: process.env.EMITTER_PORT
  }, () => {
    console.log('connected');
  });

  client.on('connect', () => {
    const uniqueSubscriptionList = new Set(subscriptionList);

    if (uniqueSubscriptionList.size) {
      uniqueSubscriptionList.forEach((subscriptionItem, index, array) => {
        client.subscribe({
          channel: subscriptionItem,
          key: process.env.EMITTER_KEY
        });
      });
    }
  });

from emitter.

snaquaye avatar snaquaye commented on September 4, 2024

I would also want to add, using the same code and a local installation of emitter, on my development machine, the client was able to subscribe to emitter seamlessly.

from emitter.

Florimond avatar Florimond commented on September 4, 2024

I generate the key from myipaddress:8080/keygen

I would also want to add, using the same code and a local installation of emitter, on my development machine, the client was able to subscribe to emitter seamlessly.

If you generate a key locally (myipaddress:8080/keygen), this key will only be valid for your license, on your servers.

Other than that, you may want to check the documentation here at the bottom of the page : https://emitter.io/develop/message-filtering/

from emitter.

snaquaye avatar snaquaye commented on September 4, 2024

I'm currently using the key generated by the server on the server and not mismatching them.

Thanks

from emitter.

r6m avatar r6m commented on September 4, 2024

Hi @kelindar
I have the same issue.
I run docker then it gives me the license and secret key. I set license as EMITTER_LICENSE env .
I'm using emitter-go provided example with o.AddBroker("tcp://127.0.0.1:8080").

I replaced the key in main.go with the secret key emitter docker gave at first run

but it returns an error:
error during publish received (The security key provided is not authorized to perform this operation.

BTW, without AddBrocker and using the cloud. it does not connect at all.
this is the connection error to the cloud emitter.
Error on Client.Connect(): Network Error : dial tcp 35.192.143.180:8080: i/o timeout

from emitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.