nats-rpc/nrpc

Make the server side subjects a setting (not a constant)

cdevienne opened this issue · 3 comments

Currently the client side can be configured at runtime to use a different subject.
The server side, on the other hand, uses constants to define the subject it listens to (and parse).
This situation is inconsistent, it should be made consistent by removing the setting on the client or adding some settings on the server.

It would also be nice if we could set a general subject namespace at runtime.

Hello @zeeraw,

You can use the package subject parameters to do that:

option (nrpc.packageSubjectParams) = "instance";

That's cool, thank you @cdevienne – Really need to dig deeper into the examples.