moleculer-go / moleculer

🚀 Progressive microservices framework for Go - based and compatible with https://github.com/moleculerjs/moleculer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moleculerjs and moleculer-go compatibility issue

nnqq opened this issue · comments

commented

Current Behavior

Call moleculerjs => moleculer-go throws error on moleculerjs side. But calling moleculer-go => moleculerjs works as expected

Console output

[2020-03-05T19:44:41.385Z] WARN  imac-denis.local-9788/BROKER: Service 'goMath.add' is not available.
(node:9788) UnhandledPromiseRejectionWarning: ServiceNotAvailableError: Service 'goMath.add' is not available.
    at ServiceBroker.findNextActionEndpoint (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/node_modules/moleculer/src/service-broker.js:857:13)
    at ServiceBroker.call (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/node_modules/moleculer/src/service-broker.js:876:25)
    at Timeout._onTimeout (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/server.js:21:37)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)

Expected Behavior

Expected to get response from moleculer-go service

Console output

Response from Golang service => 3

Failure Information

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. clone https://github.com/nnqq/moleculer-go-and-js
  2. run make bug on master branch
  3. watch for console output (error)

Reproduce code snippet

Repository https://github.com/nnqq/moleculer-go-and-js

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Moleculerjs version: v0.13.13
  • Moleculer-go version: v0.2.1
  • NodeJS version: v12.13.1
  • Golang version: v1.14
  • Operating System: macOS v10.15.3

Failure Logs

[2020-03-05T19:44:41.385Z] WARN  imac-denis.local-9788/BROKER: Service 'goMath.add' is not available.
(node:9788) UnhandledPromiseRejectionWarning: ServiceNotAvailableError: Service 'goMath.add' is not available.
    at ServiceBroker.findNextActionEndpoint (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/node_modules/moleculer/src/service-broker.js:857:13)
    at ServiceBroker.call (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/node_modules/moleculer/src/service-broker.js:876:25)
    at Timeout._onTimeout (/Users/denis/go/src/github.com/nnqq/moleculer-go-and-js/js/server.js:21:37)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
commented

This bug does not reproduces on moleculer-go develop branch, only on master

@nnqq thank you. will look into this.

Fixed with:
https://github.com/moleculer-go/moleculer/releases/tag/v0.2.2

@nnqq tested with your repo and works fine there also.

@nnqq release -> https://github.com/moleculer-go/moleculer/releases/tag/v0.2.3

another fix that improves moleculer JS compatibility. have a look.

commented

@pentateu all call directions works. Awesome! Thank you