{"id":19991910,"url":"https://github.com/Particular/NServiceBus.SqlServer","last_synced_at":"2025-05-04T11:30:29.278Z","repository":{"id":10565418,"uuid":"12769207","full_name":"Particular/NServiceBus.SqlServer","owner":"Particular","description":"SQL Server Transport for NServiceBus","archived":false,"fork":false,"pushed_at":"2025-04-29T21:17:35.000Z","size":10458,"stargazers_count":44,"open_issues_count":30,"forks_count":36,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-29T21:24:09.172Z","etag":null,"topics":["nservicebus","sql-server"],"latest_commit_sha":null,"homepage":"https://docs.particular.net/nservicebus/sqlserver/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Particular.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-09-11T22:17:14.000Z","updated_at":"2025-04-29T21:11:21.000Z","dependencies_parsed_at":"2023-10-05T02:01:17.963Z","dependency_job_id":"9d1b8880-333b-497f-99a4-5bccfb3c640d","html_url":"https://github.com/Particular/NServiceBus.SqlServer","commit_stats":null,"previous_names":[],"tags_count":115,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Particular%2FNServiceBus.SqlServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Particular%2FNServiceBus.SqlServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Particular%2FNServiceBus.SqlServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Particular%2FNServiceBus.SqlServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Particular","download_url":"https://codeload.github.com/Particular/NServiceBus.SqlServer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252329059,"owners_count":21730541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nservicebus","sql-server"],"created_at":"2024-11-13T04:51:57.866Z","updated_at":"2025-05-04T11:30:29.270Z","avatar_url":"https://github.com/Particular.png","language":"C#","funding_links":[],"categories":["C\\#","Utilities"],"sub_categories":[],"readme":"# NServiceBus.SqlServer \n\nNServiceBus.SqlServer provides support for sending messages using [Microsoft SQL Server](http://www.microsoft.com/sqlserver) or [PostgreSQL](https://www.postgresql.org.pl/) without the use of a service broker.\n\nIt is part of the [Particular Service Platform](https://particular.net/service-platform), which includes [NServiceBus](https://particular.net/nservicebus) and tools to build, monitor, and debug distributed systems.\n\nSee the [SQL Server transport documentation](https://docs.particular.net/transports/sql/) and [PostgreSQL transport documentation](https://docs.particular.net/transports/postgresql/) for more details on how to use it.\n\n## Installation\n\n### SQL Server \n\nBefore doing anything else, make sure you have SQL Server up and running in your environment. Also, make sure it is accessible from all the machines in your setup.\n\n1. Choose which package you want to use:\n   - [NServiceBus.Transport.SqlServer](https://www.nuget.org/packages/NServiceBus.Transport.SqlServer) — references [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient)\n   - [NServiceBus.SqlServer](https://www.nuget.org/packages/NServiceBus.SqlServer) — references [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient)\n1. Add the package to your project(s).\n1. In your code provide the necessary connection information to communicate with the SQL server instance. A typical setup would be:\n   ```csharp\n   \u003cconnectionStrings\u003e\n     \u003cadd name=\"NServiceBus/Transport\" connectionString=\"Data Source=.\\SQLEXPRESS;Initial Catalog=nservicebus;Integrated Security=True;TrustServerCertificate=true\"/\u003e\n   \u003c/connectionStrings\u003e\n   ```\n\n### PostgreSQL\n\n1. Add [NServiceBus.Transport.PostgreSql](https://www.nuget.org/packages/NServiceBus.Transport.PostgreSql) the package to your project(s).\n1. In code [provide connection string information](https://docs.particular.net/transports/postgresql/connection-settings#connection-configuration) necessary to connect to the PostgreSQL database, e.g.:\n   ```csharp\n   var transport = new PostgreSqlTransport(\"User ID=\u003cuser\u003e;Password=\u003cpwd\u003e;Host=localhost;Port=5432;Database=nservicebus;Pooling=true;Connection Lifetime=0;\");\n   ```\n   \n### Connection pooling\n\nDeployments with multiple endpoints running on PostgreSQL require external connection pooling e.g. [using pgBouncer](/docs/postgre-with-pgbouncer.md)\n\n## Testing \n\n### Performance\n\nConsider creating a RAM drive or using a temporary one when running in a cloud VM and hosting your databases to reduce the time required to run acceptance tests.\n\n### Running tests locally\n\nThe tests expect a SQL Server instance to be available.\n\nAll tests use the default connection string `Data Source=.\\SQLEXPRESS;Initial Catalog=nservicebus;Integrated Security=True;TrustServerCertificate=true`. This can be changed by setting the `SqlServerTransportConnectionString` environment variable. The initial catalog, `nservicebus`, is hardcoded in some tests and cannot be changed.\n\n### Requirements\n\n- MSDTC is required to run tests.\n- The following databases must be created in advance in the configured instance:\n  - `nservicebus`\n  - `nservicebus1`\n  - `nservicebus2`\n- The following schemas must be created in advance in the `nservicebus` database\n  - `receiver` owner `db_owner`\n  - `sender` owner `db_owner`\n  - `db@` owner `db_owner`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FParticular%2FNServiceBus.SqlServer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FParticular%2FNServiceBus.SqlServer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FParticular%2FNServiceBus.SqlServer/lists"}