nservicebus3

ASP.NET MVC4 NServiceBus Attribute/Filter StructureMap

我只是一个虾纸丫 提交于 2019-12-14 03:12:08
问题 I'm having issues getting an instance of IBus in an action filter (attribute). From Setting IBus Property in MVC Filter, I know that DI and action filters don't play nice, and I got them play nice using the accepted answer. The problem is that getting DI and action filters to play nice breaks NServiceBus. That same question had a suggestion by John to look at the video store solution to see how to get it done. There are two problems with that answer: It totally ignores the fact that I'm using

Use Bus.Send (not Publish) from web applications (NServiceBus v3.2.0.0)

筅森魡賤 提交于 2019-12-12 03:28:53
问题 We have an asp.net mvc3 application which publishes a number of events. Recently, someone pointed out that we should be sending messages rather than publishing events from the web application and referenced this excellent blog post which makes perfect sense. However, I want to confirm that the points made in the post are still valid for NServiceBus v3.x? Thanks! 回答1: I would imagine that the reasoning behind the post would always hold true, irrespective of the version of NServiceBus. That

NServiceBus - Server is throwing empty message warning to the console

有些话、适合烂在心里 提交于 2019-12-11 19:11:58
问题 2013-03-28 10:18:32,374 [Worker.5] WARN NServiceBus.Unicast.UnicastBus [(null)] <(null)> - Received an empty message - ignoring. I have a client that bus.send("server", command) going from an mvc4 website to a message processor. The message processor was setup to be default without any custom initialization. This is my configuration on the website side in the global.asax Configure.With() .StructureMapBuilder(container) .JsonSerializer() .Log4Net() .MsmqTransport() .IsTransactional(false)

Configuring NServiceBus with ASP.NET MVC4 and StructureMap

断了今生、忘了曾经 提交于 2019-12-11 18:39:52
问题 I created an ASP.NET MVC 4 web application by installing structuremap and structuremap.mvc4 from nuget. I then added the nservicebus and nservicebus.structuremap packages, also from from nuget. I've created a couple mvc4 apps with structuremap before with no problems, and I've followed a few tutorials for basic pub/sub with nservicebus and structuremap and got it to work. However, putting nservicebus into mvc4 with structuremap doesn't work very well when I tried. The problem I'm encountering

NServiceBus endpoints looking for RavenDB for timeouts after upgrading 3.0.3 -> 3.2.2

醉酒当歌 提交于 2019-12-11 02:13:17
问题 Using NuGet I upgraded all the NServiceBus references in a project from 3.0.3 to 3.2.2 For the 4 services in this solution I also gave them references to NServiceBus.Host from NuGet I deployed the binaries to a test environment, and the services now startup but then fail after some time with the error below. Is there some additional configuration required in 3.2? Unhandled Exception: Magnum.StateMachine.StateMachineException: Exception occurr ed in Topshelf.Internal.ServiceController`1[

MSMQ consuming large amounts of memory when processing messages with NServiceBus

…衆ロ難τιáo~ 提交于 2019-12-10 17:49:25
问题 I have two windows services which use NserviceBus. One writes messages to the queue and the other reads from it and do some processing. All the queues are transactional and the NserviceBus endpoints are configured as below. .IsTransactional(true) .IsolationLevel(IsolationLevel.ReadCommitted) .MsmqTransport() .RunTimeoutManager() .UseInMemoryTimeoutPersister() .MsmqSubscriptionStorage() .DisableRavenInstall() .JsonSerializer() The issue is when a large amount of messages (170,000+) are queued,

NServiceBus error queues in Azure

笑着哭i 提交于 2019-12-10 11:46:41
问题 I'm trying to setup NServiceBus in Azure. During local development I am using the storages queues and when deployed in the cloud I am using the Azure Service Bus. For some reason when an error occurs, messages are not moved to the error queue. In fact, the error queue isn't even created. In my Web.config file I have the following configuration: <MessageForwardingInCaseOfFaultConfig ErrorQueue="myApp-errors"/> When configuring NServiceBus I call: .MessageForwardingInCaseOfFault() When a

NServiceBus Dependency Injection

此生再无相见时 提交于 2019-12-07 12:12:48
问题 I've been having a bit of trouble with this. Andreas Öhlund answered a question on it here, but I've been unable to get it to work using the advice he gave. Here's my setup: public abstract class CommandHandler<T> : IHandleMessages<T>, IDomainReadRepository where T : Command { public IDomainRepository DomainRepository { get; set; } protected abstract void OnProcess(T command); public TAggregate GetById<TAggregate>(Guid id) where TAggregate : IEventProvider, new() { return DomainRepository

What is the correct way to use the timeout manager with the distributor in NServiceBus 3+?

懵懂的女人 提交于 2019-12-07 00:15:17
问题 Version pre-3 the recommendation was to run a timeout manager as a standalone process on your cluster, beside the distributor. (As detailed here: http://support.nservicebus.com/customer/portal/articles/965131-deploying-nservicebus-in-a-windows-failover-cluster). After the inclusion of the timeout manager as a satellite assembly, what is the correct way to use it when scaling out with the distributor? Should each worker of Service A run with timeout manager enabled or should only the

NServiceBus Dependency Injection

99封情书 提交于 2019-12-05 23:00:43
I've been having a bit of trouble with this. Andreas Öhlund answered a question on it here , but I've been unable to get it to work using the advice he gave. Here's my setup: public abstract class CommandHandler<T> : IHandleMessages<T>, IDomainReadRepository where T : Command { public IDomainRepository DomainRepository { get; set; } protected abstract void OnProcess(T command); public TAggregate GetById<TAggregate>(Guid id) where TAggregate : IEventProvider, new() { return DomainRepository.GetById<TAggregate>(id); } public void Handle(T message) { OnProcess(message); // Domain repository will