Questions tagged [nservicebus]

NServiceBus is a highly pluggable, reliable, open source Enterprise Service Bus built on .NET.

The most popular Service Bus for .NET

Simple and easy publish/subscribe communication over any transport, on premise and in the cloud. Get enterprise-grade scalability and reliability for your workflows and integrations without any messy XML configuration - just pure-code bliss. Runs on MSMQ, RabbitMQ, Azure, and more – optimally configured out of the box so you can focus on your business logic.

Resources

Installation

NServiceBus can most easily be installed through its NuGet package.

Install-Package NServiceBus
2232 questions
0
votes
1 answer

NServiceBus - intercept application failure

I have following situation: My application which uses NServiceBus has to work with remote MSSQL Server which often not available, so application fails after some time. Is there a way to intercept that event using NServiceBus and send email (or…
user306080
  • 1,409
  • 3
  • 16
  • 37
0
votes
1 answer

NServiceBus Delay Retries configure on only one queue

I have an instance of NServiceBus that is used for multiple queues. Now I have only one queue that requires a special type of delay retries and a custom policy. In this queue I have a 3rd party call, and I want it to be retried 10 times with a…
Radu
  • 1,047
  • 12
  • 34
0
votes
1 answer

Testing NServiceBus Behavior with custom Handler

I have a MessageHandler with a custom attribute on it. The behavior I'm testing does something based on the value of that attribute. The NServicebus documentation only gives unit tests examples of a behavior based on a mocked handler. How can I use…
Thijs
  • 3,015
  • 4
  • 29
  • 54
0
votes
1 answer

How to access IServiceProvider in IHostBuilder extensions?

Having net5.0 app, I would like to utilize UseNServiceBus(...) extension provided by NServiceBus.Extensions.Hosting to build the endpoint, wrap it to an IHostedService and run/stop it on app start/stop. Unfortunately I would need to access other…
sharpener
  • 1,383
  • 11
  • 22
0
votes
1 answer

NServiceBus 7 concurrency doubts

In NServicebus 7 you can set concurrency that means you can decide how many messages in queue your software can process in parallel. This can be done at NserviceBus Endpoint level. I have few doubts about this concept: the concurrency is per queue…
Enricosoft
  • 869
  • 2
  • 10
  • 28
0
votes
2 answers

Cleint not receive response: “No handlers could be found for message type”

I have a .net core service that needs to send a request via nservicebus. I resolve IMessageSession with DI and send a request like this: var response = await messageSession.Request(request); In the logs I see that another…
Sheinar
  • 362
  • 3
  • 14
0
votes
2 answers

NServiceBus filtering messages to subscribers

I'm just getting started with NService bus and I want to know how to filter message when I send them so that they only go to particular subscribers. For example, lets say I have a database with products that are categorized. My publisher will check…
Charlino
  • 15,802
  • 3
  • 58
  • 74
0
votes
2 answers

NServiceBus sending information when a subscriber subscribes

I'm just getting started with NServiceBus and I've got a very basic implementation up and running - much like the PubSub sample application. What I want to do is to send some information when a subscriber subscribes. For example, lets say I have a…
Charlino
  • 15,802
  • 3
  • 58
  • 74
0
votes
1 answer

Configure NServicebus in Asp.net Core 5

I am using the NServiceBus.Extensions.Hosting extension to configure NServicebus public class Program { public static void Main(string[] args) { CreateHostBuilder(args).Build().Run(); } private static IHostBuilder…
Martin Andersen
  • 2,460
  • 2
  • 38
  • 66
0
votes
1 answer

NServiceBus - should command and respective handler be in the same namespace?

I have 2 microservices communicating with each other via NServiceBus. Let's say SVC1 sends a command to SVC2 which in response do something and emits some events (which eventually subscribed by other services including SVC1). I have separate…
Deepak Kumar
  • 615
  • 1
  • 5
  • 20
0
votes
2 answers

Interaction between IMessageSession and TransactionScope

I have an IMessageSession and I would like to know if it's possible to make sending/publishing messages part of a transaction? e.g. would the following work? using (var scope = new TransactionScope()) { // Some task that may or may not succeed …
Carl
  • 1,782
  • 17
  • 24
0
votes
2 answers

beginning NServiceBus and dependancy injection and instances

Im having some problems with NServiceBus, I can get the pubsub example working fine, but now I'm trying to integrate it into a production project and I cant get the thing to work! My publisher code is exactly the same as the publisher example (I've…
Chris Allison
  • 73
  • 1
  • 10
0
votes
2 answers

NServiceBus 2.0 loses first published message when using MsmqSubscriptionStorage

I am using MsmqSubscriptionStorage in a pub/sub scenario and the first message is lost when the subscriptions has not been stored. If I watch the debug messages, while running in the GenericHost, I see that all the subscriptions are setup but the…
Mark Lindell
  • 852
  • 8
  • 19
0
votes
2 answers

using nservicebus in vb.net

Im trying to convert the nServiceBus PubSub .net4 example into vb and I'm struggling at one point which I think is a language issue but I thought I would ask the experts. The code in question is from the publisher: var eventMessage = publishIEvent ?…
Chris Allison
  • 73
  • 1
  • 10
0
votes
1 answer

Can I expose two methods in my Server with NServiceBus?

I was looking an answer for this but I couln't find it. As you know, the NServiceBus library came with a sample that's call WCF Integration. It has an interface that the Server exposes as a WCF service, right? This interface has only one method…