icebob / microservices-benchmark

Benchmark of microservices frameworks for NodeJS
40 stars 12 forks source link

Adding molleculer pattern-matching #6

Closed danielo515 closed 6 years ago

danielo515 commented 6 years ago

Hello, I'm trying to add a benchmark using moleculer pattern matching middleware: https://github.com/danielo515/microservices-benchmark/blob/master/suites/remote.js#L36-L67

However, when I run the benchmarks I get the following errors:

Unhandled rejection ProtocolVersionMismatchError: Protocol version mismatch.
    at Transit.messageHandler (/Users/danielo/GIT/microservices-benchmark/node_modules/moleculer/src/transit.js:220:14)
    at Object.client.subscribe [as callback] (/Users/danielo/GIT/microservices-benchmark/node_modules/moleculer/src/transporters/nats.js:151:42)
    at Client.processMsg (/Users/danielo/GIT/microservices-benchmark/node_modules/nats/lib/nats.js:1003:11)
    at Client.processInbound (/Users/danielo/GIT/microservices-benchmark/node_modules/nats/lib/nats.js:931:14)
    at Socket.<anonymous> (/Users/danielo/GIT/microservices-benchmark/node_modules/nats/lib/nats.js:470:12)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:279:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at TCP.onread (net.js:636:20)

Any help is welcome

Regards

icebob commented 6 years ago

Maybe you have another running moleculer node on NATS which is newer or older. To avoid collisions, set namespace in broker options in remote.js suite file.

danielo515 commented 6 years ago

Yes, I have two moleculer running on the same Nats. I'll try to setup what you said

evseevnn-zzz commented 6 years ago

@danielo515 That helped your?

danielo515 commented 6 years ago

Sorry, At the end I left molleculer because pattern matching was just an experiment and I am currently using Seneca.

I'll close this issue for now, if I come back to using molleculer I'll report back.

Regards