I have seen it mentioned several times as a best practice that there should be one distributor process configured per message type, but never any explanation as to why this is so. Since increasing the number of distributors increases the deployment complexity, I'd like to know the reasoning behind it. My guess is that if all available subscribers for a given message type are busy, the distributor may be stuck waiting for one to free up, while messages of other types which may have free subcribers are piling up in the distributor's work queue. Is this accurate? Any other reasons?
What is the reason behind NServiceBus one-distributor-per-message-type best practice?
1.3k views Asked by jlew At
2
There are 2 answers
1
David Boike
On
Having one logical endpoint per message type (logical endpoint is equal to either one endpoint or many copies of an endpoint behind a distributor) allows you the flexibility to monitor and scale each use case independently.
Also, it enables you to version the endpoint for one message type independently from all the others.
There is higher deployment complexity in that you have more processes installed, and ultimately you have to strike a balance (as always) between flexibility and complexity, but keep in mind that many of these deployment headaches can be automated away.
Related Questions in DEPLOYMENT
- Github Pages Deployment deploys a blank page
- Django Admin Panel and Sub URLs Returning 404 Error on Deployment
- Next 14 App Router pages from dynamic routes not generating when deployed on vercel but only work on localhost
- Deployment through app engine, cloud sql database, problem connecting with server code, doesn't connect
- How to Deploy and Manage a Python Application with Systemd
- Elasticbeanstalk FastAPI application is intermittently not responding to https requests
- Duplicate GET requests - Rails & Heroku
- How to use a proxy to obtain a static IP for my Node.js application?
- Next js app throwing 404 error when deployed to vercel, even though it works fine on local
- How to deploy my shiny application (with multiple files) via Docker
- Deploying telegram bot
- How to deploy angular 17 SSR into IIS
- Route not working on refreshing the page in react deployed application
- Vercel wildcard route's src results in 404 error in Hapi.js backend
- Django deployment with GTK3
Related Questions in NSERVICEBUS
- NLog with NServiceBus
- Nservicebus and sqlite
- Messages not being received for NServiceBus on RabbitMQ
- NServiceBus Outbox exactly once processing
- NServiceBus & Entity Framework
- NServiceBus Invalid Subscriptions
- Unit tests fail after upgrading from NServiceBus 7 to NServiceBus 8
- Difficulty in Identifying Working Messages Amidst Unknown Message Types in ServiceInsight
- Disable outbox connection resolution for incoming Response messages when using client-side callbacks
- NSerciceBus SetMessageId actually set correlationId?
- NServiceBus - capturing event handled by "child" saga also in "parent" saga
- RabbitMQ high memory usage
- Custom Topic Naming in NServiceBus using SQSTransport
- Using NServiceBus with an ASMX web service
- Map a saga with a list in the sagadata in nservicebus
Related Questions in TOPOLOGY
- Is there a way to reorder vertices?
- Correct way to loop through a list in R
- Slurm - How does topology/tree actually link to the scheduling-logic and how does it model the topology?
- RLock(s) were not greened, Eventlet.monkey(patch) error
- Getting output of CLI commands in some text file
- Round-Robin Ryu controller for mininet
- Offset buffer to another geometry
- Comparing topological structure of similar data sets
- Containment algorithms and Convex hull algorithms to check if a point is inside the d dimensional convex hull spanned by n vectors
- KafkaStreams doesn't accept my serde in StreamsConfig
- R persistence homology - identify points that generate topological features
- Blender Topology and UV editing, how to put a tileable texture on a curved mesh? How to make the topology better?
- Mathematica and Sympy is unable to simplify expressions such as log(e^A) to A, and errors involving for Integrating limtis to be real
- Computing persistent homology Betti numbers on big data
- Barcode with Vietoris Rips Filtration
Related Questions in NSERVICEBUS-DISTRIBUTOR
- How to configure NserviceBus with AzureStorageQueueTransport and Azure Storage account which is having private access level
- How to interpret number of messages in Distributor's Storage and Control queues?
- Is it safe to call bus.Publish from an NServiceBus handler when using distributor?
- NServiceBus stops a message from being handled by two consumers?
- Add dynamic addresses in gateway NserviceBus
- NServiceBus worker unregistration not working
- NServiceBus: Cannot enlist the transaction (failed to send msg to audit queue)
- NServiceBus distributor worker create a queue called PRIVATE$\order_queue$
- Is it possible to return failed messages to distributor source queue but not worker?
- NServiceBus: Increasing number of messages in storage-queues after saga-timeouts
- NServicebus+RabbitMQ and Distributor
- not able to enable the timeout manager in a distributor with Production profile in a Master node
- ServiceControl in a deployment with a distributor
- NServiceBus 4.03 Removing worker node
- NServiceBus 4.03 Distributor puts 30 messages into storage queue for one message in the control queue
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
It is true that the Distributor will not hand out more work until a Worker is done. Therefore if Workers are tied up with a given message type, the others will sit there until they are done. NSB doesn't have a concept of priority, all messages are created equal. Workers do not subscribe to specific message types, they just get handed work from the Distributor.
If certain message types have "priority" over others, then they should have their own Distributor. If the "priority" is all the same then adding more workers will increase performance to a certain point. This will depend upon what you are resoruce you are operating upon. If it is a database, your endpoint may be more data bound than cpu bound. In that case adding more Workers won't help as they are creating increasing contention on potentially the same resource. In this case you may need to look into partitioning the resource some how.