Questions tagged [moleculer]

Moleculer is a progressive microservices framework for Node.js

Moleculer is a progressive microservices framework for Node.js. It helps you to build efficient, reliable & scalable services. Moleculer provides many features for building and managing your microservices.

84 questions
0
votes
1 answer

Moleculer pub/sub good practice

I protype with moleculer and just wondering on an architecural issue. My app is build with many pieces: moleculer services, redis, nats, C language app,... and it's deployed on ks8 cluster. I have to subscribe to an event published by moleculer…
Maciek Leks
  • 1,288
  • 11
  • 21
0
votes
1 answer

How to put route aliases in the individual service settings instead of the API gateway service in Molecular

As mentioned in the documentation route aliases can be put in the API service, but I want to put the aliases in the individual service settings, how can I do that? Let's say I have a users service and API gateway, and the users service have a role…
Mohamed SLimani
  • 351
  • 2
  • 9
0
votes
1 answer

Moleculer: segmenting micro service communication

I just starting playing with Moleculer and saw how easy it is to call a service actions/events from another service. This is great. However, is there a way to limit which services can access particular services? So for example if I have products and…
camba1
  • 1,795
  • 2
  • 12
  • 18
0
votes
1 answer

Moleculer-Cli inspired project: how to use EJS instead of Handlebars

I'm trying to create some scaffolding tool to easily start a project the way I want. I like the way how guys from moleculer do it in their https://github.com/moleculerjs/moleculer-cli They use Handlebars so now I can do this in my template (for…
daremes
  • 15
  • 6
0
votes
1 answer

Service to service authentication in (hapi+molecular) NodeJS

I have different microservices developed in Hapi+Molecular. I used hapi-moleculer npm module to add molecular in hapi, I am using redis as transported to communicate between services. I can call functions of service A from service B... what i need…
0
votes
0 answers

Not able to connect/call services of other nodes Moleculer NodeJs

I have created 2 nodes for moleculer using npm init project project_name I have added a service users.list in project one which gives list of all users which is working fine also i exposed its api. But issue is, when i run the other node project2,…
Muhammad Aadil Banaras
  • 1,134
  • 1
  • 11
  • 21
0
votes
1 answer

Strict Collection/Table name setting in Moleculer DBService

I'm designing Moleculer JS microservice which extends Moleculer DB and can extend both SQL (for example Sequelize) and noSQL (for instance, MongoDB) adapters. Here is a book service schema const uuid = require('uuid/v4') const Sequelize =…
humkins
  • 9,635
  • 11
  • 57
  • 75
0
votes
1 answer

How to properly detect mixin action in middlewares

I use custom mixins, which have internal actions. I use middlewares over my own actions. But actions of mixins fall into middlewares. Need to use some duck typing check for ignoring mixin actions in middlewares. Example for moleculer-io: if…
darky
  • 163
  • 1
  • 7
0
votes
0 answers

Moving a microservice to a different host

I have created a few micro-services using the "Moleculer" framework and am running each micro-service in a separate docker container (on a single host) using docker-compose. Traefik is being used as a reverse proxy. I wanted to move one of the…
0
votes
1 answer

Get select fields from find method from mysql Database in Moleculer Framework

Can you please suggest how to get select fields from find method ? e.g let params = { limit, offset, query: request }; this.adapter.find(params) Here, this will return all fields but instead of this I…
Nimesh
  • 3,342
  • 1
  • 28
  • 35
0
votes
1 answer

Getting metrics for micro services deployed using Docker Swarm across hosts

I have created a few micro services using the Moleculer framework which communicate with each other. The micro services have been deployed on different hosts using Docker Swarm. How do I get the total number of calls that each service makes to…
0
votes
1 answer

How to forward Post request in moleculerjs (Node.js)?

I already tried using ctx.$location=“/targetpath” but the forwarded request change to get Method, not the original post method.
Verky Yi
  • 1
  • 1
0
votes
1 answer

Circuit breaker config not working properly

I am setting up new molecular project and trying to config circuit breaker in my project under molecular.config.js and set windowOpen to 6 sec. But when i do any operation and throw an error. Circuit doesn't break down. I am not able to find any…
0
votes
1 answer

Is possible to have parameters on the moleculer-web route path?

Is there a way to add parameters on a moleculer-web route path? I would like to add a parameter in the path to avoid to add in each alias. I have tried to add a parameter, but after that, I could not reach the endpoint…
aquilesb
  • 2,182
  • 1
  • 19
  • 19
0
votes
0 answers

Use ES6 'import' instead of 'require' in microservices framework for Node.js

I am using moleculer microservices framework for Node.js. Now, I need to use ES6 import instead of require. For Example, const { abc } = require("../../index.js"); **// This is working well.**
import { abc } from "../../index.js"; **//…
Nimesh
  • 3,342
  • 1
  • 28
  • 35