You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
queue_for_resource# needs to be dynamically generated where resource# is some unique id. Because of this, I can't just put it all in the topology config because I don't know how many or which ones I will need ahead of time. I assume should be dynamically generated because:
Only 1 consumer should be able to process from a queue for a resource at a time. This is because the tasks in the queue will eventually do calls that modify that particular resource e.g. in a database, so if 2 consumers try to process at the same time, the resource will lock and fail. I was looking at prefetch: 1, exclusive queue, and exclusive consumer, and while I'm not sure of the differences, I believe exclusive consumer is the solution?
I think the solution is a combination of:
addQueue - with unique resourceId as name
bindQueue
startSubscription - with exclusive for 1 consumer at a time???
Another concern is what happens if consumer1 is assigned to queue_for_resource1, but consumer1 goes down? Will another consumer, such as consumer2 automatically subscribe and pick up where it left off?
The text was updated successfully, but these errors were encountered:
queue_for_resource#
needs to be dynamically generated whereresource#
is some unique id. Because of this, I can't just put it all in the topology config because I don't know how many or which ones I will need ahead of time. I assume should be dynamically generated because:Only 1 consumer should be able to process from a queue for a resource at a time. This is because the tasks in the queue will eventually do calls that modify that particular resource e.g. in a database, so if 2 consumers try to process at the same time, the resource will lock and fail. I was looking at
prefetch: 1
,exclusive queue
, andexclusive consumer
, and while I'm not sure of the differences, I believeexclusive consumer
is the solution?I think the solution is a combination of:
addQueue
- with unique resourceId as namebindQueue
startSubscription
- withexclusive
for 1 consumer at a time???Another concern is what happens if
consumer1
is assigned toqueue_for_resource1
, butconsumer1
goes down? Will another consumer, such asconsumer2
automatically subscribe and pick up where it left off?The text was updated successfully, but these errors were encountered: