FAQ Database Discussion Community


How do I enable the cscfg overrides to work with NServiceBus Azure configuration

azure,nservicebus,azureservicebus,azure-configuration
When using NServiceBus the Transport connection string doesn't seem to be fetched from the applicable Cloud configuration first but immediately from the app.config. Options I've tried: Using the configuration section (: cscfg <ConfigurationSettings> <Setting name="AzureServiceBusQueueConfig.ConnectionString" value="Endpoint=sb://xxx.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=yyy" /> </ConfigurationSettings> app.config <AzureServiceBusQueueConfig...

Why does NServiceBus on Azure append “.events” to my Topic names?

azure,nservicebus,nservicebus5
I have an Azure Topic called "response1" and I would like to subscribe to messages sent to the topic using NServiceBus. My problem is that instead of subscribing to response1, NServiceBus creates a new Topic on azure called response1.events and subscribes to that. Why does NServiceBus add ".events" to some...

NServiceBus Endpoint Routing Injection

nservicebus,structuremap,nservicebus4
I am trying to inject my own IRouteMessagesToEndpoints in NServiceBus with structure map as I need to redirect various messages to different endpoints depending on some business logic (not via namespace/assembly/type). This would allow it to fire using bus.Send(); and be configured to our requirements. I thought this was possible,...

NServiceBus analytics

nservicebus,serviceinsight
We have gone with our first integration deployment into production with NServiceBus. ServiceInsight and ServicePulse are very handy, especially ServiceInsight - it is very helpful to understand things during go-live activities, even though it is sluggish. I would like to see if there are any easy ways to pull information...

using nservicebus to subscribe to a specific message type

c#,nservicebus,soa,publish-subscribe
I am looking into using nservicebus and wondering how hard it would be to do the following in the publish/subscribe topology. For example, a client(s) would subscribe to User type messages. But only subscribe to a subset of these messages, for example User messages with userkeys of 111,222,xxx,etc. These subset...

Could not load type 'GatewayDeduplication' from assembly 'NServiceBus.Core

ravendb,nservicebus
I installed RavenDB and then in the configuration I did: public static void ConfigurePersistence(BusConfiguration configuration) { var defaultStore = new DocumentStore { Url = "http://localhost:8085", DefaultDatabase = "MyTestb" } .RegisterListener(new UniqueConstraintsStoreListener()) .Initialize(); configuration.UsePersistence<RavenDBPersistence>() .DoNotSetupDatabasePermissions() .SetDefaultDocumentStore(defaultStore); } When I run the project then I am seeing below error: System.Reflection.TargetInvocationException: Exception has...

NServicebus monitoring with ServiceInsight

nservicebus
I tried ServiceInsight/ServicePulse to monitor our NServibuce infrastructure. However, the ServiceControl service can monitor only one error queue. For multiple environments(dev/int/acc/prod), what is the best practice? I guess the best is to install one ServiceControl service by environment? We have also handlers on multiple servers. In order to monitor everything...

Can Autofac IStartable be used with NServiceBus when the startable component needs IBus?

asp.net-mvc,bootstrap,nservicebus,autofac
The scenario here is that there is a component that needs to run some initialisation code on start-up. This is achieved by having the code implement Autofac.IStartable.Start and registering the code as IStartable. This code is then used in several contexts: A couple of ASP.NET websites, an NServiceBus.Host.exe hosted NSB...

NServiceBus Test.Initialize() given key was not present

c#,unit-testing,nservicebus,nservicebus5
Update just read the Google group in more detail and apparently it's a app config issue. Will update post after trying. I was wondering if anyone knows of this issue when attempting to unit test NServiceBus. Realise I have two initialize methods below but this is to illustrate what I...

NServiceBus saga Unique attribute

nservicebus,saga,nservicebus-sagas
I have a saga data class with one property marked by Unique attribute. However, this didn't prevent NServiceBus from creating several sagas with identical values in this field. Here is my data class: public class ModuleAliveSagaData : ContainSagaData { [Unique] public string ModuleId { get; set; } public string Endpoint...

Explanation for Exchanges created by NServiceBus with RabbitMQ

rabbitmq,nservicebus
Can anyone please explain why NServiceBus creates the above RabbitMQ Exchanges along with the expected exchanges based on Handler configuration? Edit: No IEvent / IMessage / object Handler classes defined. Using DefiningEventAs changes nothing (same exchanges and queues created). conf.DefiningEventsAs( t => t.Name.EndsWith("Event") && t.Namespace != null && t.Namespace.EndsWith("Events"))...

NServiceBus Host and Endpoint Configuration

nservicebus
I have been going through the NServiceBus samples, one point which is not clear to me is the cardinality of NserviceBus Host to Endpoint. Is the relationship 1 NServiceBusHost to 1 Endpoint? What does this look like in production? 1 Windows Service per 1 Endpoint? Thanks In Advance...

Why does NServiceBus on Azure not use my specified endpoint name?

azure,nservicebus,nservicebus5
I have a console app that uses NServiceBus to publish a message to an Azure topic. However, NServiceBus creates a new topic with a different name, instead of the one I specified. Why is this? More details My message configuration looks as follows. This means that messages of Type 'TheResponse'...

Particular NServiceBus Sagas: Concurrent Access to Saga Data Persisted in Azure Table Storage

concurrency,nservicebus,azure-table-storage,nservicebus4
This question is in regards to concurrent access to saga data, when saga data is persisted in Azure Table Storage. It is also references information found in Particular's documentation: http://docs.particular.net/nservicebus/nservicebus-sagas-and-concurrency We've noticed that, within a single saga executing handlers concurrently, modifications to saga data appear to be operating in a...

NServiceBus & deciding service boundaries

nservicebus,soa
I am a beginner at NSB and I have been looking for some kind of rule of thumb for deciding what constitutes as a separate service. Unfortunately I haven't found much online or in David Boike's book or on the docs page. The typical examples given are Sales, Shipping, Billing....

Saga Wait for Status value

c#,nservicebus,saga,nservicebus-sagas
I have a Saga which should wait for a specific Database-Value to be changed. How do I achieve this? Example: public partial class OrderSaga : Saga<OrderSagaData>, IHandleMessages<FinishOrder> { public void Handle(FinishOrder message) { Order order=new Order(message.OrderId); if (order.Approved) { SendMail(order); } } } When the bool "Approved" of that Order...

How to measure invocation time of “Handle” method in NServiceBus?

c#,castle-windsor,nservicebus,stopwatch,nservicebus5
I need to measure invocation time of Handle method in every instance of IHandleMessages<> interface. I tried to use Interceptor of Castle Windsor, public class NsbHandlerMeasurementInterceptor : IInterceptor { public void Intercept(IInvocation invocation) { if (invocation.Method.Name == ExpressionExtender.GetMethodName<IHandleMessages<DummyType>>(b => b.Handle(null))) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); invocation.Proceed(); stopwatch.Stop(); //...

NServiceBus 5 with RavenDb 3

ravendb,nservicebus
I'm trying to run NServiceBus 5 with RavenDb as persistence. First I got an exception that I need to upgrade my RavenDb server, so I downloaded the latest RavenDb and installed it (3.0.0 / cdc39ac / , Build version: 3528). Now when I run my project I get the following...

NServiceBus 5 using AzureStoragePersistence results in “Failed to fetch timeouts from the timeout storage” on machines other then development machine

nservicebus
I try to use Azure Table Storage for the persistence of timeout data and I experience an error on environments other than my local development machine. My local machine is creating the timeout tables on Azure and is able to poll timeout data successfully. But, if I host the same...

Combine azure mobile service autofac with nservicebus registrations

azure,nservicebus,azure-mobile-services
I am trying to combine the registrations of the azure mobile service and the nservicebus registrations. When i try to inject the IBus into an controller it doesn't work. public class AutofacConfig { public static void Register(HttpConfiguration http, ContainerBuilder container) { var busConfiguration = new BusConfiguration(); busConfiguration.UseContainer<AutofacBuilder>(c => c.ExistingLifetimeScope(container.Build())); var...

Should sagas be used to persist progress in execution of a handler?

nservicebus,saga
I have a handler whose job it is to take a list of objects, and for each item in that list of objects, Publish an event. That may look something like the code below: Handle(PublishListMessage message) { foreach(var entry in message.List) { Bus.Publish(entry); } } My use case is that...

Best Practice for setting up RabbitMQ cluster in production with NServiceBus

rabbitmq,nservicebus,rabbitmq-exchange
Currently we have 2 load balanced web servers. We are just starting to expose some functionality over NSB. If I create two "app" servers would I create a cluster between all 4 servers? Or should I create 2 clusters? i.e. Cluster1: Web Server A, App Server A Cluster2: Web Server...

NServiceBus with Azure Service Bus, always checking existence of namespace and queue

azure,nservicebus,azureservicebus
I am using NServiceBus, with Azure Service Bus as the transport. Every time I send a message, I see the following in the logs: Checking existence cache for '...' Checking namespace for existance of the queue '...' Determined that the queue '...' exists Queue '...' already exists, skipping creation Despite...

NServiceBus Azure Queue Transport: Set connection string in code

nservicebus,azureservicebus
I'm using NServiceBus with Azure service bus transport. Currently, I provide the connection string for the queue in the app.config like this: <add name="NServiceBus/Transport" connectionString="Endpoint=..." /> I need to supply this in code, not in configuration. I'm using the code on this page as an example of how to do...

How do I update to StructureMap 3.x while staying on NServiceBus 4.x?

c#,dependency-injection,nservicebus,structuremap,nservicebus4
I want to upgrade to StructureMap 3.x on my MVC project, but I'm stuck on NServiceBus 4.x because the 5.x license terms do not make sense for our limited usage. The MVC project is send-only. How can I upgrade StructureMap while leaving NSB 4.x in place?...

Discard message from nServiceBus mutator

nservicebus
I need to discard a message if a specific header is present. I tried to implement a IMutateTransportMessages and call DoNotContinueDispatchingCurrentMessageToHandlers() method inside MutateIncoming but the message is dispatched to handlers anyway. I can discard the message using an handler but I don't like it because I need also to...

Is it possible to configure an NServiceBus endpoint (on Azure transport) to accept a simple string as input?

azure,nservicebus,azureservicebus,nservicebus5
We have an NServiceBus endpoint that monitors an Azure Service Bus Queue (using Azure as a transport). But not all the clients that send messages to the queue are .NET-based. Can an NServiceBus endpoint be configured to accept a simple string as input? I've tried intercepting messages with a class...

Nservicebus disable default logger in web.config

nservicebus,nservicebus5
I'm using the DefaultFactory LogManager for Nservicebus v5. I'm happy with this but was hoping to be able to disable via the web.config. I use web.config settings, as found in the help docs <configSections> <section name="Logging" type="NServiceBus.Config.Logging, NServiceBus.Core" /> </configSections> <Logging Threshold="Debug" /> I'd prefer not to set the threshold...

How can I partially load handlers with NServiceBus?

c#,nservicebus
I am running a console application within which there is a multitude of handlers extending <IHandleMessages>. When I run the application, I want to specify command line arguments such that only some of those handlers will be running. I am working in part with existing code, so I am slightly...

Is there a way to pass a child container into the NserviceBus pipeline?

c#,wcf,autofac,nservicebus
Problem: A request sent to a WCF service, which calls IBus.SendLocal creates two instances of an object configured as InstancePerLifetimeScope() Background: I'm using Autofac.Integration.WCF (which makes everything resolve 'per request', by providing a new child scope to each WCF request) IBus.SendLocal invokes a message mutator, which gets injected with the...

NServiceBus Worker checking in with capacity of 0

msmq,nservicebus
I am using NServiceBus 3.3. I am trying to get a new Pre-Prod-Environment setup. It all works fine in production and in one of my existing Pre-Prod-Environments with my existing configurations. But in my new Environment, I am getting my workers checking-in with a capacity of 0. (They check-in with...

NServiceBus AzureSagaPersistence schema issue

azure,nservicebus,saga,nservicebus-sagas
I have updated my saga data class by adding one more DateTime property and everything went to hell. The schema wasn't updated and I started to get exceptions on each saga message, but I had no important data there so I removed the table. Since then, the saga data table...

NServiceBus SqlTransport - Unable to resolve message type for sending

nservicebus,nservicebus5
UPDATE I found the problem. I was not inheriting from ICommand so I added the convention however now i am receiving the following exception: The destination queue 'Reimbursement' could not be found. You may have misconfigured the destination for this kind of message (Reimbursement.Messages.Commands.RequestForReimbursementCommand, Reimbursement.Messages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null) in the...

NServiceBus 5 without DTC involvement?

nservicebus,msdtc,nservicebus5
I am reading through the documentation and the following confuses me because it states at the top of the document with version 5 we get reliability without using the DTC. These feature has been implemented using both the Outbox pattern and the Deduplication pattern. As a message is dequeued we...

Handling NServiceBus messages in ASP.NET MVC app

c#,asp.net-mvc,iis,nservicebus
Is it safe to handle NServiceBus messages in ASP.NET MVC application as the application pool can be recycled after some idle time? Let's assume that all the messages should be handled by the handler as soon as possible (it won't be possible after recycling the app pool). Of course we...

In ServiceMatrix, is it possible to 'ConvertToSaga' an endpoint which publishes/subscribes event messages rather than command messages?

nservicebus,nservicebus-sagas
I've got a solution with 4 NSB host endpoints which were created using ServiceMatrix and I want to use them within a saga. I know how to Convert To Saga from a command and that works fine in a test project. What I don't understand is how I can do...

NServiceBus and concurrency

concurrency,nservicebus
This link talks about how NServiceBus handle concurrency for sagas. However, it does not show an example that explains when the concurrency can happen. In an e-commerce application, the orders are per user so there is not a case of multiple users updating the same order. I don't see a...

NServiceBus use type full name in EnclosedMessageTypes metadata

serialization,nservicebus,assembly-signing
NServiceBus includes meta Header with message "NServiceBus.EnclosedMessageTypes". It puts AssemblyQualifiedName of serialized type in there. e.g.: MyNamespance.MyType, MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7777777777777777 Can I make NServiceBus use just type FullName instead? eg: MyNamespance.MyType instead of AssemblyQualifiedName. Use Case: Some legacy part of the system code requires assemblies signed. I don't want...

ServiceInsight Azure Connecting to VM

azure,nservicebus,serviceinsight
I was wondering if it was possible to connect to a Service Insight hosted on a Virtual Machine locally? What I mean is: I have Service Insight installed on a VM in the cloud Can remote into it via Remote Desktop Can launch Service Insight on the box to view...