nservicebus

What is a servicebus and when do I need one?

偶尔善良 提交于 2019-12-02 13:58:28
I have heard talk about the NServiceBus , but I haven't really understood what it is. They claim to be "The most popular open-source service bus for .net". So; what is a "service bus", and when do I need one? You can think of a service bus as the Ethernet of SOA. First and foremost, it introduces a language of identifying things, like an IP address in Ethernet. This name isn't something inherently physical. Next, you have something physical involved on each node, like a queue in the case of a bus for supporting semi-connected communication, or an Ethernet card in the metaphor. Beyond just the

nServiceBus vs Mass Transit vs Rhino Service Bus vs other?

大兔子大兔子 提交于 2019-12-02 13:58:22
Just doing some quick spikes into possibly using a messaging system to process files that are in a nicely decoupled work flow system. What are the pro's and cons that people have found of using each of the above frameworks? What are the advantages of using these versus a hand-rolled MSMQ system with the WCF bindings and/or non-MSMQ solutions?? I'd recommend staying away from hand-rolled solutions as there is a bunch of somewhat difficult stuff that needs to be gotten just right - like how transactions are handled, how exceptions cause rollbacks, how to stop rolling back endlessly (poison

Exception in RavenDB.SagaPersister.Save, “Guid should contain 32 digits with 4 dashes”. Guid is empty in Raven

我怕爱的太早我们不能终老 提交于 2019-12-02 12:07:38
NServiceBus 5.1, RavenDB persistence, AutoFac container, log4net, all latest versions in NuGet at time of posting. EndpointConfig: log4net.Config.XmlConfigurator.Configure(); LogManager.Use<Log4NetFactory>(); // Raven DataStore for Freight system var freightDataStore = new DocumentStore { ConnectionStringName = "RavenDB", DefaultDatabase = "ProTeria.Freight" }; freightDataStore.Initialize(); freightDataStore.Conventions.IdentityPartsSeparator = "-"; Raven.Client.Indexes.IndexCreation.CreateIndexes(typeof(ProTeria.NET.RavenDB.BringInvoiceIndexes.BringInvoiceIndexBringIdAndStatus).Assembly,

NServiceBus.Host - How do I add the endpoint instance to my IoC container

我怕爱的太早我们不能终老 提交于 2019-12-02 11:14:12
问题 I'm trying to upgrade a solution from NServiceBus 5 to 6. Currently, we are injecting IBus to a service class so that the service can send messages to the bus as needed. Now that IBus is no longer available in 6, how do I inject the endpoint instance when the endpoint is created using NServiceBus.Host, which will itself start this endpoint? There is an example provided at the bottom of https://docs.particular.net/samples/hosting/multi-hosting/: var endpointConfiguration = new

NService bus message delay problem

本小妞迷上赌 提交于 2019-12-02 10:06:36
问题 Yesterday I did a production simulation. The results where not good. The connection between the two servers is OK. From time to time there is huge delay, about 5-10 minutes. I send a message, two, three.. twenty and the other side do not receives them. And then boom, all messages are there and the reply is send to the sender. The other situation is when I send 10 messages, the other side receives them momentarily and replies. But the replies are not received by the sender. After 5-10 minutes

How to swap out MSMQ in NServiceBus 2.0 for a different transport technology

牧云@^-^@ 提交于 2019-12-02 09:34:21
What is the correct way to swap out MSMQ transport layer to leverage another transport technology under the hood from within the NServiceBus 2.0 API? Andreas Ohlund (@ andreasohlund ) answered my question on twitter with the following: "You should go for the NServiceBus trunk and implement IMessageQueue (see the Azure queue impl for reference)" NServiceBus trunk (CodeBetter TeamCity) Blog post by Andreas Ohlund on NServiceBus Azure transport layer implementation. 来源: https://stackoverflow.com/questions/3092309/how-to-swap-out-msmq-in-nservicebus-2-0-for-a-different-transport-technology

WebException error 404 after upgrading NServiceBus to version 3.3.8

瘦欲@ 提交于 2019-12-02 09:17:14
I just updated my NServiceBus solution to version 3.3.8. My previous version was 3.2.2. When I run my solution, I receive the following error: WebException Occurred The remote server returned an error: (404) Not Found. System.Net.WebException occurred HResult=-2146233079 Message=The remote server returned an error: (404) Not Found. Source=System StackTrace: at System.Net.HttpWebRequest.GetResponse() at Raven.Client.Connection.HttpJsonRequest.ReadStringInternal(Func`1 getResponse) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line 279 InnerException: From

NullReferenceException when initializing NServiceBus within web application Application_Start method

吃可爱长大的小学妹 提交于 2019-12-02 08:09:23
问题 I am running the 2.0 RTM of NServiceBus and am getting a NullReferenceException when my MessageModule binds the CurrentSessionContext to my NHibernate sessionfactory. From within my Application_Start, I call the following method: public static void WithWeb(IUnityContainer container) { log4net.Config.XmlConfigurator.Configure(); var childContainer = container.CreateChildContainer(); childContainer.RegisterInstance<ISessionFactory>(NHibernateSession.SessionFactory); var bus = NServiceBus

Deffering messages with nservicebus

本秂侑毒 提交于 2019-12-02 06:06:35
I am dealing with nServiceBus and I want to retry and a message at another time when one fails. I have heard of Bus.Defer() but my understanding of it is limited. I have a system that checks stock codes. It checks when the command is called and reschedules another check after 8pm. I have CheckCurrentProductAvailabilityCommand that runs a function that checks stock codes. This is handled by CurrentProductAvailabilityRequestHandler. If it fails I then run ScheduleCheckStockAvailabilityCommand with the stock code this is handled by ScheduleCheckStockCodeAvailabilityProcessor. I then run a

NServicebus - One endpoint multiple handlers threading

末鹿安然 提交于 2019-12-02 03:35:37
I have two endpoints. Endpoint 1: HandlerForMessage X HandlerForMessage Y HandlerForMessage Z Web endpoint: - No handlers at this time, just sends commands to the bus. The following happens: Web -> Send< MessageX >(..); Endpoint 1: Receive MessageX Endpoint 1: Handle MessageX and in Handler Bus.Send< MessageY >() and Bus.Send< MessageZ >() Endpoint 1: Receive MessageY, handle it (this takes 20 seconds) Endpoint 1: 20 seconds later, after handling MessageY, receive MessageZ and handle it. Since MessageY, MessageZ have different Handlers can't this be done simultaniously? Creating another