NATS WorkQueue unexpected "filtered consumer not unique on workqueue stream" #1577
theobouwman
started this conversation in
General
Replies: 1 comment 1 reply
-
I think i found the correct setup with setting the @nats_router.subscriber(
"user.email.summary.send",
durable="user-email-summary-send",
stream=MOMO_WORKER_DEFAULT,
max_workers=5,
deliver_policy=DeliverPolicy.ALL,
pull_sub=PullSub(batch_size=10)
)
@inject
async def handler(msg: UserEmailSummarySendPayload, user_service: Annotated[UserService, FromDishka()]):
print(f"Sending email to {msg.user_id}")
return msg Is this the recommended way to setup a work queue with deliver once? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My WorkQueue Pull handlers work fine. But, when I start multiple instances for horizontal scaling we observe a
nats.js.errors.BadRequestError: nats: BadRequestError: code=400 err_code=10100 description='filtered consumer not unique on workqueue stream'
error. But to my understanding our subjects do not overlap...Beta Was this translation helpful? Give feedback.
All reactions