-
Notifications
You must be signed in to change notification settings - Fork 233
Closed
Labels
defectSuspected defect such as a bug or regressionSuspected defect such as a bug or regression
Description
Observed behavior
pull_subscribe and pull_subscribe_bind do not use the client's inbox prefix, they use the default inbox prefix unless the call to the method explicitly re-passes the client's inbox prefix.
Expected behavior
Given the inbox prefix has already been configured in the client, I would expect that default to be used consistently, including for jetstream pull subscriptions.
Server and client version
server 2.12.1
client 2.12.0
Host environment
Mac, Docker
Steps to reproduce
from nats import NATS
async def main() -> None:
nc = NATS()
await nc.connect(inbox_prefix="_INBOX_demo")
js = nc.jetstream()
sub = await js.pull_subscribe("some.subject") # does not use _INBOX_demo
msg = await sub.fetch(1)Suggested change
Instead of these defaults in the method signatures:
nats.py/nats/src/nats/js/client.py
Line 548 in 454841d
| inbox_prefix: bytes = api.INBOX_PREFIX, |
nats.py/nats/src/nats/js/client.py
Line 623 in 454841d
| inbox_prefix: bytes = api.INBOX_PREFIX, |
Use the same logic for _async_reply_prefix from earlier in the file:
nats.py/nats/src/nats/js/client.py
Line 139 in 454841d
| self._async_reply_prefix = self._nc._inbox_prefix[:] |
Metadata
Metadata
Assignees
Labels
defectSuspected defect such as a bug or regressionSuspected defect such as a bug or regression