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
+31-5Lines changed: 31 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ Each of the following sections describes the advantages and disadvantages of eac
25
25
*[Amazon SQS](#amazon-sqs)
26
26
*[RabbitMQ](#rabbitmq)
27
27
*[SQL Server](#sql-server)
28
+
*[PostgreSQL](#postgresql)
28
29
*[MSMQ](#msmq)
29
30
*[Learning Transport](#learning)
30
31
@@ -109,32 +110,57 @@ Azure Storage Queues has fewer features than Azure Service Bus but can be more c
109
110
- When high throughput is not required
110
111
- When scale-out is not required. Scaling out requires Azure Service Bus
111
112
112
-
113
-
114
113
## SQL Server
115
114
116
115
The SQL Server transport implements queues using relational database tables. Each row of a queue table holds one message with an ID, headers, and body, plus additional columns for backward compatibility.
117
116
118
117
### Advantages
119
118
120
119
- SQL Server is already present in many organizations. This could result in lower licensing and training costs, as well as a reduction in operational risk, since the skills and knowledge required to run SQL Server are already present.
121
-
- Mature tooling, such as [SQL Server Management Studio (SSMS)](https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms)
120
+
- Mature tooling, such as [SQL Server Management Studio (SSMS)](https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms) and [Azure Data Studio](https://learn.microsoft.com/en-us/azure-data-studio/download-azure-data-studio)
122
121
- Free to start with the [SQL Server Express or Developer editions](https://www.microsoft.com/en-us/sql-server/sql-server-downloads)
123
122
- Easy scale-out through competing consumers. Multiple instances of the same endpoint consume messages from a single queue.
124
123
- 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))
125
124
- Can store both queues and business data in a single backup, making it easier to restore a system to a consistent state
126
125
127
126
### Disadvantages
128
127
129
-
- Adds pressure to the server due to polling for new messages
128
+
- Adds pressure to the database server due to polling for new messages
130
129
- Depending on throughput, can add significant load to an existing SQL Server installation
130
+
- 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.
131
132
132
133
### When to select this transport
133
134
134
135
- When it's not possible to introduce a native queueing technology
135
-
- When the benefits of introducing a native queueing technology are outweighed by the cost of licensing, training, and ongoing maintenance compared with using an existing SQL Server infrastructure
136
+
- 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
136
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.
139
+
140
+
## PostgreSQL
141
+
142
+
Similar to [SQL Server](#sql-server), the PostgreSQL transport implements queues using relational database tables. Each row of a queue table holds one message with an ID, headers, and body.
137
143
144
+
### Advantages
145
+
146
+
- PostgreSQL is already present in many organizations, as a relational database that doesn't have the licensing limitations of a commercial solution such as SQL Server or Oracle. This could result in lower licensing and training costs, as well as a reduction in operational risk, since the skills and knowledge required to run PostgreSQL are already present.
147
+
- Mature tooling, such as [pgAdmin](https://www.pgadmin.org) and [Azure Data Studio](https://learn.microsoft.com/en-us/azure-data-studio/download-azure-data-studio)
148
+
- Easy scale-out through competing consumers. Multiple instances of the same endpoint consume messages from a single queue.
149
+
- Can store both queues and business data in a single backup, making it easier to restore a system to a consistent state
150
+
151
+
### Disadvantages
152
+
153
+
- Adds pressure to the database server due to polling for new messages
154
+
- 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/)
157
+
158
+
### When to select this transport
159
+
160
+
- When it's not possible to introduce a native queueing technology
161
+
- 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
163
+
- When the system has a small number of endpoints.
0 commit comments