NServiceBus | monitor better microservices with the most powerful service | Messaging library

 by   Particular C# Version: 8.0.3 License: Non-SPDX

kandi X-RAY | NServiceBus Summary

kandi X-RAY | NServiceBus Summary

NServiceBus is a C# library typically used in Messaging applications. NServiceBus has no bugs, it has no vulnerabilities and it has medium support. However NServiceBus has a Non-SPDX License. You can download it from GitHub.

NServiceBus is licensed under the RPL 1.5 license. More details can be found here.

            kandi-support Support

              NServiceBus has a medium active ecosystem.
              It has 1971 star(s) with 636 fork(s). There are 136 watchers for this library.
              There were 4 major release(s) in the last 6 months.
              There are 229 open issues and 3070 have been closed. On average issues are closed in 385 days. There are 4 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of NServiceBus is 8.0.3

            kandi-Quality Quality

              NServiceBus has 0 bugs and 0 code smells.

            kandi-Security Security

              NServiceBus has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              NServiceBus code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              NServiceBus has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              NServiceBus releases are available to install and integrate.
              NServiceBus saves you 1 person hours of effort in developing the same functionality from scratch.
              It has 5 lines of code, 0 functions and 1355 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here
            Get all kandi verified functions for this library.

            NServiceBus Key Features

            Build, version, and monitor better microservices with the most powerful service platform for .NET

            NServiceBus Examples and Code Snippets

            No Code Snippets are available at this moment for NServiceBus.

            Community Discussions


            NServiceBus with RabbitMQ Simple event
            Asked 2022-Apr-01 at 20:44

            I want to be able to used NServiceBus to add a message on a queue in RabbitMQ. I dont want to handle it yet so just want to see an item on the queue, my code is as follows, but I get this error when I run it?

            I have been trying to look at the documentation but is seems overly confusing. I am familar with RabbitMq and using it as is or with the Rabbit client library, but NService bus seems to complicate and confuse the situation!



            Answered 2022-Apr-01 at 20:44

            Your endpoint is publishing the message as well as receiving it. Since there's no handler defined to handle the UserChanged messages (events), NServiceBus recoverability kicks in. Your options are

            1. Declare the endpoint as send-only to avoid handling the messages when there are no handlers defined
            2. Define a handler for UserChanged

            Source https://stackoverflow.com/questions/71712458


            Compacting very long text inside table row in html
            Asked 2022-Mar-22 at 06:51

            I'm building html tables where some of the can hold extremely long text. Can I wrap it like after 100 chars it has "..." and maybe on click it would reveal the whole text?

            If possible I do like to keep this current style config and just add this feature.



            Answered 2022-Mar-22 at 06:51

            Yes, you can wrap the "super long text" inside a div then assign this styles to the div. white-space: nowrap; overflow: hidden; text-overflow: ellipsis;


            Source https://stackoverflow.com/questions/71564451


            NServiceBus UseTransport not working after upgrading to .NET 6
            Asked 2021-Dec-03 at 03:45

            I'm using NserviceBus with the Azure Function project ( NServiceBus.AzureFunctions.InProcess.ServiceBus). Application is using azure service bus as the transport and it is configured in function startup by using the below code



            Answered 2021-Dec-02 at 12:35

            As you are using the stable versions for your application like:

            I would suggest to change the syntax and try based on connection string use cases:

            To use Azure Service Bus as the underlying transport: Method 1:

            If your connection string variable AzureServiceBusConnectionString is present in the web config file, then try calling the connection string using the below code:

            Source https://stackoverflow.com/questions/70165904


            What is the correct format of connectionstring for Azure Service Bus when using Managed Identity for my App Service?
            Asked 2021-Nov-05 at 14:34

            I have this App Service in Azure running as a Web Job. The application is a former Windows Service built using NServiceBus and I have been reconfiguring it to work in Azure.

            The application is using AzureServiceBusTransport and I have my Azure Service Bus with a queue set up.

            I got it working... when I am using a Shared Access Key configured in my connectionstring like this;



            Answered 2021-Nov-05 at 14:34

            Just ran into the same issue with NServiceBus. Instead of:

            Source https://stackoverflow.com/questions/69850737


            Why does a force downgrade causes an assembly load exception in .Net Core?
            Asked 2021-Nov-05 at 13:29

            I have a sample solution with a console and library project. Both reference the same nuget but a different version. The console project also has a reference to the library project. So the structure is like this:



            Answered 2021-Nov-05 at 13:29

            It appears to be by design.

            A little bit of searching, I found this: https://github.com/dotnet/fsharp/issues/3408#issuecomment-319466999

            The coreclr will load an assembly of the version or higher than the reference. If the assembly discovered is lower than the reference then it fails.

            Also this: https://github.com/dotnet/sdk/issues/384#issuecomment-260457776

            downgrading the assembly version isn't supported on .NET Core

            So, to confirm, I spent much more time than I intended looking/searching through https://github.com/dotnet/runtime. Eventually I found the assembly version compatibility method: https://github.com/dotnet/runtime/blob/172059af6623d04fa0468ec286ab2c240409abe3/src/coreclr/binder/assemblybindercommon.cpp#L49-L53

            It checks all the components of the version separately, but if we look at just one, we can see what it's doing:

            Source https://stackoverflow.com/questions/69852563


            The significance of keeping NServiceBus Outbox document record for 7 days in CosmosDB
            Asked 2021-Aug-09 at 03:26

            As per NServiceBus Azure Cosmos DB persistence documentation, the outbox deduplication data is kept for 7 days by default. However, this can easily add hundreds of outbox documents in a day for a high volume transaction DB. I understand we can change the default settings to reduce the outbox ttl. However, before doing that, I would like to understand the following:

            • What is the significance of keeping the outbox document for 7 days in Cosmos DB?
            • What is the impact of reducing the ttl of the outbox document to, say, 4 days? Does it mean if a message has failed, it can be only recovered for the next 4 days? If yes, is there a way to clean up the outbox record for the transactions that are successful immediately?


            Answered 2021-Aug-09 at 03:26

            What is the significance of keeping the outbox document for 7 days in Cosmos DB?

            This is the default value. It's chosen to be on the safe side and ensure that no duplicates are reprocessed within 7 days, which is a fairly safe time range.

            What is the impact of reducing the ttl of the outbox document to, say, 4 days?

            If you reduce TTL to 4 days and there's a chance of a duplicate message arriving after that period, the duplicate will be processed rather than discarded.

            Does it mean if a message has failed, it can be only recovered for the next 4 days?

            The outbox feature is not about removing messages. It's used for de-duplication of the incoming messages to avoid unnecessary re-processing.

            If yes, is there a way to clean up the outbox record for the transactions that are successful immediately?

            You could set TTL to a very low value but then you're risking running into duplicate reprocessing as it's not about successful or unsuccessful incoming message processing but rather duplicates you cannot control. Not to mention that the outbox feature helps to reduce unnecessary handler execution upon incoming message retries in case dispatching has failed.

            Source https://stackoverflow.com/questions/68705343


            Send Message when NServiceBus Recoverability fails using Notifications
            Asked 2021-Aug-02 at 17:52

            How can I send a message (or publish an event) when a message runs out of retries and moves to the error queue?

            When a request comes into my system, I create a Saga to track it. The Saga sends commands to Handlers to do async work. If the handler fails, I want to both move that command to the error queue (the default behavior) and send a message to the Saga to alert the client that originally requested the work.

            I have tried customizing the recoverability behavior to use the Saga as the error queue, which sends the command back but does not get it into the error queue:



            Answered 2021-Aug-02 at 17:52

            There's not an "easy" way to do that because at the moment when recoverability is happening, any transaction related to the incoming message (this is different for each transport) is in doubt, so you can't really do anything else within the scope of what's going on right at that moment.

            Once you start your endpoint, you can cast the IEndpointInstance to an IMessageSession (same thing without things like the Stop method) and then assign that to a place where your "error queue notifier" will be able to find it. Then any operation you do with the IMessageSession will basically be a separate context, disconnected from the processing of the incoming message.

            Just understand that if the message is failing processing because of an underlying problem with the queue, that's not going to report correctly. That's why most people would be doing some sort of call to a reporting/diagnostics service in those callbacks.

            Source https://stackoverflow.com/questions/68596030


            NServicebus not unable to resolve service for interface in handler
            Asked 2021-Jul-30 at 13:00

            I'm trying to build my first NserviceBus application, but I cannot get it to work. The message arrives on the "backend" but the handler uses DI and NServicebus claims it cannot find the service for the interface. But the code was lifted directly from the examples. I'm missing something and I cannot figure it out.

            The Error: dbug: NServiceBus.LoadHandlersConnector[0] Processing message type: Messages.JobStartCommand Message headers: NServiceBus.MessageId : 0044f261-e3b3-4287-b6f0-ad7400ef43cb NServiceBus.MessageIntent : Send NServiceBus.ConversationId : bb4f276f-63fe-450b-b234-ad7400ef43cd NServiceBus.CorrelationId : 0044f261-e3b3-4287-b6f0-ad7400ef43cb NServiceBus.ReplyToAddress : ClientUI NServiceBus.OriginatingMachine : L19002992 NServiceBus.OriginatingEndpoint : ClientUI $.diagnostics.originating.hostid : e1fecb2b72b8185e47341bb4dfb37dd7 NServiceBus.ContentType : text/xml NServiceBus.EnclosedMessageTypes : Messages.JobStartCommand, Messages, Version=, Culture=neutral, PublicKeyToken=null NServiceBus.Version : 7.5.0 NServiceBus.TimeSent : 2021-07-29 14:31:08:228497 Z NServiceBus.Retries : 3 NServiceBus.Retries.Timestamp : 2021-07-29 14:31:40:397277 Z Handlers to invoke: Extractor.JobStartHandler Extractor.JobStartHandler info: NServiceBus.RecoverabilityExecutor[0] Immediate Retry is going to retry message '0044f261-e3b3-4287-b6f0-ad7400ef43cb' because of an exception: System.InvalidOperationException: Unable to resolve service for type 'IExtract' while attempting to activate 'Extractor.JobStartHandler'. at Microsoft.Extensi

            My backend program.cs



            Answered 2021-Jul-30 at 13:00

            I cleaned out the offending interface from the code and still got the error on an interface that was not even there anymore. I removed the bin folder and build everything back up step by step. Stupid thing is, source control says I am back where I started, without changes. And it just works....

            So must have bin something stupid with VS2019. Sorry to anyone who's time I wasted

            Source https://stackoverflow.com/questions/68578369


            Publishing message using NServiceBus using Azure Function Cosmos DB Changefeed trigger
            Asked 2021-Jul-16 at 23:48

            I have an Azure function and I'm trying to send a message with NServiceBus using Azure ServiceBus transport.

            I have successfully got it working following this doc when the endpoint name does not have a “.” or period in the name. E.g.: ASBTriggerQueue

            However, my endpoint name has a period, “.” and I do not have control to change the endpoint name.

            With period in the name I get the following error:

            The ‘NServiceBusFunctionEndpointTrigger-asb.triggerqueue’ function is in error: ‘NServiceBusFunctionEndpointTrigger-a sb.triggerqueue’ is not a valid function name.

            Is anyone aware of workarounds to fix this issue?



            Answered 2021-Jul-16 at 23:48

            The problem is with the trigger function name. Functions doesn't like dots in it. With release 1.2.0 of NServiceBus.AzureFunctions.InProcess.ServiceBus you can override trigger function name. See documentation for details

            Source https://stackoverflow.com/questions/68416205


            NServiceBus: How does saga concurrency with SQL persister work?
            Asked 2021-Jun-01 at 07:03

            I'm using NServiceBus with SQL Persistance and MSSQL Server.

            I want to be sure that I don't get invalid data in my database in high concurrent scenarios.

            From the docs I know that the SQL persister uses pessimistic concurrency since version 4.1.1. But I'm not sure how it works exactly because under "Starting Saga" and "Changes to Saga state" only optimistic concurrency is mentioned.

            Does each saga instance only handle one message at a time and all the remaining messages are waiting in the queue to be handled by the saga?

            Also is it possible to configure the concurrency to use optimistic concurrency instead of pessimistic concurrency for the SQL persister?



            Answered 2021-Jun-01 at 07:03

            Both optimistic concurrency control and pessimistic locking result in a saga instance to only being able to handle 1 message.

            Might multiple messages be handled then with :

            • Optimistic concurrency control: The 2nd+ writer will fail and the message will be retried.

            • Locking: THe lock ensures that multiple messages on the same saga instance will be delayed. Sometimes this can result in a deadlock due to lock escalation and then the message will be retried.

            Regarding pessimisitic vs optimistic, you cannot choose. The latest version uses pessimistic locking. See https://docs.particular.net/persistence/sql/saga-concurrency:

            Starting in version 4.1.1 conflicts cannot occur because the persistence uses pessimistic locking. Pessimistic locking is achieved by performing a SELECT ... FOR UPDATE or its dialect-specific equivalent.

            Up to and including version 4.1, SQL persistence uses optimistic concurrency control when updating or deleting saga data.

            Source https://stackoverflow.com/questions/67719545

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install NServiceBus

            You can download it from GitHub.


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone Particular/NServiceBus

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Messaging Libraries

            Try Top Libraries by Particular


            by ParticularC#


            by ParticularC#


            by ParticularC#


            by ParticularC#


            by ParticularC#