Git Product home page Git Product logo

Comments (7)

StarpTech avatar StarpTech commented on June 25, 2024

Hi @esatterwhite if you call

hemera.act(
  {
    topic: 'stats',
    cmd: 'registeredActions',
    maxMessages$: -1
  },
  function(err, resp) {
    // is called multiple times
  }
)

you will receive multiple responses with the different actions from the services. You have to aggregate by yourself.

If you still get only the actions from one service then it could be a race condition or the plugin is not configured properly.

from hemera.

esatterwhite avatar esatterwhite commented on June 25, 2024

Oh interesting. Is there a way to know when all of the services have responded?

from hemera.

StarpTech avatar StarpTech commented on June 25, 2024

This a pull mechanism. If you think that all service should send their information to a specific subscriber at startup, feel free to create PR.

from hemera.

StarpTech avatar StarpTech commented on June 25, 2024

Oh interesting. Is there a way to know when all of the services have responded?

You can't know it. You are able to start new services at any time. I prefer to implement a solution as suggested above.

from hemera.

StarpTech avatar StarpTech commented on June 25, 2024

@esatterwhite I implemented here #218 please review

from hemera.

StarpTech avatar StarpTech commented on June 25, 2024

After the PR you can just call

hemera.ready(() => {
	hemera.sendActionStats({
	  topic: 'process.stats'
	})
})

in your services to inform your subscriber about new updates. This requires of course that your service process.stats is ready before the others.

from hemera.

StarpTech avatar StarpTech commented on June 25, 2024

Feature was published with [email protected]

from hemera.

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.