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 best solutions below
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
- Can I deploy multiple instances of my application on the same windows phone?
- Deploy enterprise (in-house) application on windows phone without developer unlocking the phone?
- uninitialized constant ActiveMerchant::Billing::CreditCard::Validateable (NameError) - in Spree shop
- How to Continuously Develop and Deploy an Access 2010 Database Application
- Efficient way of organizaing mail sending from Rails app
- Deployment over GPRS to embedded devices
- Weblogic 12c web application not start properly after server reboot
- Deployment in Weblogic 10.3, how to change properties
- Deployed Version of MVC Site Not Working
- Laravel 5 on shared hosting getting internal server error
- Integration between Java Applets and .Net dll
- Capistrano Rails deploy with new migration files
- EF Code First - Multiple Application Versions Sharing A Database
- Docker: How to create a stack, multiple images or one base image?
- Slow wpf startup due to publish policy... maybe
Related Questions in NSERVICEBUS
- Why does NServiceBus on Azure append ".events" to my Topic names?
- How to impersonate Nservicebus
- Why does NServiceBus on Azure not use my specified endpoint name?
- Is it possible to configure an NServiceBus endpoint (on Azure transport) to accept a simple string as input?
- Is it possible to properly use DDD with all building blocks in monolith application?
- Compressing headers
- Is there a way to start multiple instance of the the message handle in NServiceBus
- Configuring NServicebus 4.7 with a predefined Autofac container
- How do I send lots of messages over NServiceBus without locking the Queue?
- How to pass settings to Nservicebus JsonSerializer in C#?
- hardware requirements for NServiceBus
- node.js using domain driven design
- Particular ServiceControl auditing and Bus.HandleCurrentMessageLater();
- RabbitMQ - ensure single thread per message
- Suspecting duplicate message from RabbitMQ
Related Questions in TOPOLOGY
- MATLAB how to calculate elongation of a BW image
- Two part: How to run 'ls' from a java program and how to tell computers on a storm cluster to execute specific commands
- How to define topology in Castalia-3.2 for WBAN
- Most general higher-order constraint describing a sequence of integers ordered with respect to a relation
- Topology of Worklight Server on a Websphere Liberty Profile
- What is the point of "maintaining topology" in a 3D mesh?
- how to use drools in storm topology
- Is there a best-practice solution to self-assembly of a set of peer nodes?
- How to dynamically display a simulated network topology in Java
- Storm - DRPC versus Transactional versus Trident - When to use what?
- Creating a software for research
- Is it possible to simultaneously transmit a basic ring topology?
- D3 - How to get correct scale and translate origin after manual zoom and pan to country path
- Define a cube and three intervals in Prolog
- In search of an algorithm for sorting collection in nodes to satisfy a layout constraint
Related Questions in NSERVICEBUS-DISTRIBUTOR
- NServiceBus Distributor Worker creates a new worker queue
- nServiceBus Beta Connection Closed Exception
- NServiceBus - scaling out subscriber duplicates events across master and worker
- NServicebus Publisher/Distributor Unable to communicate with all subscribers/workers?
- Worker node handles message from two distributor
- How to configure NserviceBus with AzureStorageQueueTransport and Azure Storage account which is having private access level
- How to use nServiceBus in a failover cluster
- NServiceBus: Pros and Cons of using NServiceBus Distributor
- NServiceBus Pub/Sub example and the "Distributor"
- What is the reason behind NServiceBus one-distributor-per-message-type best practice?
- NServiceBus pipeline with Distributors
- MasterNodeConfig Behavior during NServiceBus.Master Profile Execution
- NServiceBus distributor worker create a queue called PRIVATE$\order_queue$
- NServiceBus - Distributor Control Message Errors
- Can the NServiceBus distributor report progress from workers?
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)
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?
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.