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
Copy file name to clipboardExpand all lines: transports/selecting.md
+18-20Lines changed: 18 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@ This guide does not provide definitive answers for all scenarios. Every decision
12
12
13
13
## Broker versus federated
14
14
15
-
The queueing technologies behind most transports take the form of a central message broker that handles physical message routing. The transports which use these queueing technologies rely on the broker to send and receive messages. It is important that the broker is highly available. If it cannot be reached, the system will be unable to send or receive messages. Note that, although a broker is involved, this is still a "bus" architecture and not a "broker" architecture. See [bus versus broker architecture](/architecture/messaging.md#bus-versus-broker-architectural-styles) for a discussion on the distinction.
15
+
The queueing technologies behind most transports take the form of a central message broker that handles physical message routing. The transports which use these queueing technologies rely on the broker to send and receive messages. It is important that the broker be highly available. If it cannot be reached, the system will be unable to send or receive messages. Note that, although a broker is involved, this is still a "bus" architecture and not a "broker" architecture. See [bus versus broker architecture](/architecture/messaging.md#bus-versus-broker-architectural-styles) for a discussion on the distinction.
16
16
17
-
Other queueing technologies are "federated" and deployed on every machine that sends or receives messages. The only supported transport which uses a federated queueing technology is [MSMQ](msmq). The MSMQ transport uses a "store and forward" delivery strategy. When a message is sent, it is stored locally and delivered to the remote machine only when that machine is reachable. That means messages can be sent even if the remote machine is unreachable, although they won’t be delivered until the remote machine is reachable.
17
+
Other queueing technologies are "federated" and deployed on every machine that sends or receives messages. The only supported transport using federated queueing technology is [MSMQ](msmq). The MSMQ transport uses a "store and forward" delivery strategy. When a message is sent, it is stored locally and delivered to the remote machine only when that machine is reachable. That means messages can be sent even if the remote machine is unreachable, although they won’t be delivered until the remote machine is reachable.
18
18
19
19
## Supported transports
20
20
@@ -29,7 +29,7 @@ Each of the following sections describes the advantages and disadvantages of eac
29
29
*[MSMQ](#msmq)
30
30
*[Learning Transport](#learning)
31
31
32
-
For transports which use a cloud hosted queueing technology, the quality of the network connection between the applications and cloud provider is important. If the connection is problematic, it may not be possible to send messages. For example, this may result in problems capturing data from a user interface. If applications are running the same data centre as the queueing technology, this risk is mitigated.
32
+
For transports that use a cloud hosted queueing technology the quality of the network connection between the applications and cloud provider is important. If the connection is problematic, it may not be possible to send messages. For example, this may result in problems capturing data from a user interface. If applications are running the same data centre as the queueing technology, this risk is mitigated.
33
33
34
34
This is a basic flowchart for selecting a supported transport. Where more than one transport is listed, refer to the sections below. They describe the advantages and disadvantages of each transport in more detail.
The learning transport should not be used in production.
57
57
58
-
This transport is intended for learning how to work with NServiceBus. It does not require the installation of a queueing technology and works "out of the box". This is done by storing sent and received messages as files on disk.
59
-
58
+
This transport is intended to learn how to work with NServiceBus. It does not require the installation of a queueing technology and works "out of the box". This is done by storing sent and received messages as files on disk.
60
59
61
60
## Azure Service Bus
62
61
@@ -93,7 +92,7 @@ Azure Storage Queues has fewer features than Azure Service Bus but can be more c
93
92
### Advantages
94
93
95
94
- Fully managed, turn-key infrastructure
96
-
- Can store a very large number of messages (up to the 200 TB limit of the related Azure Storage account) although this should not be required in most scenarios
95
+
- Can store a very large number of messages (up to the 200 TB limit of the related Azure Storage account), although this should not be required in most scenarios
97
96
- Low price per message
98
97
- High level of availability
99
98
@@ -128,14 +127,14 @@ The SQL Server transport implements queues using relational database tables. Eac
128
127
- Adds pressure to the database server due to polling for new messages
129
128
- Depending on throughput, can add significant load to an existing SQL Server installation
130
129
- Can have significant costs in Production for high throughput systems where extra servers or cores are required to support the load
131
-
- Inherently not designed as a messaging broker, which can lead to lower performance and connection limitations when utilized for a larger system with many endpoints.
130
+
- Inherently not designed as a messaging broker which can lead to lower performance and connection limitations when utilized for a larger system with many endpoints
132
131
133
132
### When to select this transport
134
133
135
134
- When it's not possible to introduce a native queueing technology
136
135
- When the benefits of introducing a native queueing technology are outweighed by the cost of licensing, training, and ongoing maintenance compared with using existing SQL Server infrastructure
137
-
- For integration with a legacy application which uses SQL Server, using [database triggers](/samples/sqltransport/native-integration/)
138
-
- When the system has a small number of endpoints, or a medium number of endpoints with low throughput.
136
+
- For integration with a legacy application that uses SQL Server, using [database triggers](/samples/sqltransport/native-integration/)
137
+
- When the system has a small number of endpoints or a medium number of endpoints with low throughput.
139
138
140
139
## PostgreSQL
141
140
@@ -152,14 +151,14 @@ Similar to [SQL Server](#sql-server), the PostgreSQL transport implements queues
152
151
153
152
- Adds pressure to the database server due to polling for new messages
154
153
- Depending on throughput, can add significant load to an existing PostgreSQL installation
155
-
- Inherently not designed as a messaging broker, which can lead to lower performance and connection limitations when utilized for a larger system with many endpoints.
156
-
- PostgreSQL opens a new process for each connection, and therefore has a [default concurrent connection limit of 100](https://postgresqlco.nf/doc/en/param/max_connections/). This limit is overridable, but will use more processes/resources. Having this relatively low connection limit can lead to connection starvation in systems with many [endpoints and/or endpoint instances](/nservicebus/endpoints/)
154
+
- Inherently not designed as a messaging broker which can lead to lower performance and connection limitations when utilized for a larger system with many endpoints.
155
+
- PostgreSQL opens a new process for each connection and therefore has a [default concurrent connection limit of 100](https://postgresqlco.nf/doc/en/param/max_connections/). This limit is overridable, but will use more processes/resources. Having this relatively low connection limit can lead to connection starvation in systems with many [endpoints and/or endpoint instances](/nservicebus/endpoints/)
157
156
158
157
### When to select this transport
159
158
160
159
- When it's not possible to introduce a native queueing technology
161
160
- When the benefits of introducing a native queueing technology are outweighed by the cost of licensing, training, and ongoing maintenance compared with using existing PostgreSQL infrastructure
162
-
- For integration with a legacy application which uses PostgreSQL, using database triggers
161
+
- For integration with a legacy application that uses PostgreSQL, using database triggers
163
162
- When the system has a small number of endpoints.
164
163
165
164
## RabbitMQ
@@ -170,13 +169,13 @@ Similar to [SQL Server](#sql-server), the PostgreSQL transport implements queues
170
169
171
170
- Highly adopted, with a large community of users and contributors
172
171
- Provides native reliability and high-availability features
173
-
- Offers a native publish-subscribe mechanism. Does not require a database for storing event subscriptions (via NServiceBus persistence). Explicit routing for publish/subscribe is not required.
174
-
- Ease of integration with applications running on other platforms through a wide range of [supported clients](https://www.rabbitmq.com/devtools.html).
175
-
- Native support for the [competing consumer pattern](https://www.enterpriseintegrationpatterns.com/patterns/messaging/CompetingConsumers.html). Messages are received by instances in a round-robin fashion without additional configuration.
172
+
- Offers a native publish-subscribe mechanism. Does not require a database for storing event subscriptions (via NServiceBus persistence). Explicit routing for publish/subscribe is not required
173
+
- Ease of integration with applications running on other platforms through a wide range of [supported clients](https://www.rabbitmq.com/devtools.html)
174
+
- Native support for the [competing consumer pattern](https://www.enterpriseintegrationpatterns.com/patterns/messaging/CompetingConsumers.html). Messages are received by instances in a round-robin fashion without additional configuration
176
175
177
176
### Disadvantages
178
177
179
-
- Running RabbitMQ in a cluster, which is strongly recommended, requires deeper operational knowledge of RabbitMQ. Not all companies have the same level of expertise as with other technologies, like SQL Server. This may require additional training.
178
+
- Running RabbitMQ in a cluster, which is strongly recommended, requires deeper operational knowledge of RabbitMQ. Not all companies have the same level of expertise as with other technologies, such as SQL Server. This may require additional training.
180
179
- Doesn’t handle [network partitions](https://www.rabbitmq.com/partitions.html) well; partitioning across a WAN requires the use of specific features.
181
180
- Requires careful consideration for duplicate messages, e.g. using the [outbox](/nservicebus/outbox) feature or making all endpoints idempotent.
182
181
- Might require covering additional costs of [commercial RabbitMQ license and support](https://www.rabbitmq.com/services.html).
@@ -213,13 +212,13 @@ This is a popular transport for systems hosted in AWS, the Amazon cloud offering
213
212
> [!WARNING]
214
213
> Microsoft is not making MSMQ available for .NET Core; building new systems using MSMQ is not recommended.
215
214
216
-
The MSMQ transport uses the native Windows queueing technology, MSMQ, to send and deliver messages. MSMQ is a distributed or "federated" system that consists of multiple processes, one on each machine. The client only interacts with the local MSMQ process, which stores the messages on disk. The messages are forwarded to the remote machine in the background.
215
+
The MSMQ transport uses the native Windows queueing technology, MSMQ, to send and deliver messages. MSMQ is a distributed or "federated" system consisting of multiple processes, one on each machine. The client only interacts with the local MSMQ process, which stores the messages on disk. The messages are forwarded to the remote machine in the background.
217
216
218
217
### Advantages
219
218
220
219
- Built-in component of the Windows operating system (though not installed by default)
221
220
- Supports distributed transactions, allowing atomic message processing and data manipulation in database systems which also support distributed transactions (e.g. SQL Server), using the [Microsoft Distributed Transaction Coordinator (MSDTC)](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms684146(v=vs.85))
222
-
- Uses a store and forward mechanism which allows sending messages even when the destination machine is unavailable due to network issues or other problems
221
+
- Uses a store and forward mechanism that allows sending messages even when the destination machine is unavailable due to network issues or other problems
223
222
224
223
### Disadvantages
225
224
@@ -230,5 +229,4 @@ The MSMQ transport uses the native Windows queueing technology, MSMQ, to send an
230
229
231
230
- For a better guarantee that the queueing technology is available for applications to send messages
232
231
- When running a Windows environment on-premises and unable to invest in licenses or training for other technologies
233
-
- When distributed transactions are required to guarantee consistency of data with respect to message handling
234
-
232
+
- When distributed transactions are required to guarantee consistency of data for message handling
0 commit comments