Support setting a custom inbox prefix via nats.Options #678
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR makes it possible to configure a custom inbox prefix.
Comments and critique welcome :-)
Use Case:
We @pascomnet are using a unique service identifier as part of every subject
including inboxes, without custom inbox prefix suppport we can't use the go
clients built in facilities for Requests, while e.g. the java client supports
this out of the box.
Proposed Change:
It can be done in a fully backwards compatible way (see pull request)
Who Benefits From The Change(s)?
Everyone who wants to use this feature :-)
Alternative Approaches
Do not use the builtin request/inbox client features, without reimplementing the
relevant nats.go parts this is a lot less efficient, a naive approach requires a
new subscription per request. In effect this is similar to old style requests.
Benchmarks
Here is my benchmark environment:
Results on master:
Results from this PR: