Closed OsoianMarcel closed 7 years ago
Hi @OsoianMarcel this behaviour is correct because you can't start multiple services with the same topic and different implemenation. The publisher is not aware of that because the request is load balanced between them. If you call to a service topic:service
that service has to contain the full implementation doesnt matter where it lives.
You can create other services if you assign a unique topic name. The topic
is the smallest unit in hemera.
Refer to your example:
Server.js and Subscriber.js share the same topic service
but dont implement the full contract
{topic: 'service', cmd: 'do'}
{pubsub$: true, topic: 'service', cmd: 'event'}
when the request arrives NATS, NATS cant know that therefore No handler could be found
Description
Problem with PUBSUB: No handler found for this pattern (PatternNotFound)
Steps to Reproduce
server.js
subscriber.js
client.js
Steps to Reproduce
1. Start server.js (no output)
2. Start subscriber.js (no output)
3. Start client.js
Output (expected output):
4. Now check subscriber.js output (PROBLEM)
Expected Result
Expected subscriber.js output:
Actual Result
Actual subscriber.js result (ERROR):
Very important: Subscriber recevied the event, but with errors.
Context
Your Environment