nservicebus

NServiceBus 2.0 considerations when running on Mono and deployed to *nix

Deadly 提交于 2019-12-10 07:32:35
问题 Is NServiceBus compatible with Mono? Are you / have you run NServiceBus on Mono? If so what issues did you run into? NServiceBus leverage's MSMQ by default. I know this can be swapped out for different transport technologies, so I would imagine an initial task may involve implementing a provided "IMessageQueue " interface (or something along those lines) from the NServiceBus library that leverage's a cross platform or Unix Specific message queue / transport technology. Related Question: "How

NServiceBus: Pros and Cons of using NServiceBus Distributor

别说谁变了你拦得住时间么 提交于 2019-12-09 13:13:44
问题 I am considering using a Network Load Balancer to load balance messages between my subscriber instances, instead of using the NServiceBus distributor (which is basically just a software load-balancer from what I can tell). Each subscriber instance will have a queue of the same name for messages to be delivered to, and there will be a virtual IP that round-robins between the subscribers. The publisher will only know about the virtual IP and queue name. Here is what I understand as the pros and

如何优雅的使用RabbitMQ

泄露秘密 提交于 2019-12-09 12:25:26
目录 RabbitMQ无疑是目前最流行的消息队列之一,对各种语言环境的支持也很丰富,作为一个.NET developer有必要学习和了解这一工具。消息队列的使用场景大概有3种: 1、系统集成,分布式系统的设计。各种子系统通过消息来对接,这种解决方案也逐步发展成一种架构风格,即“通过消息传递的架构”。 2、当系统中的同步处理方式严重影响了吞吐量,比如日志记录。假如需要记录系统中所有的用户行为日志,如果通过同步的方式记录日志势必会影响系统的响应速度,当我们将日志消息发送到消息队列,记录日志的子系统就会通过异步的方式去消费日志消息。 3、系统的高可用性,比如电商的秒杀场景。当某一时刻应用服务器或数据库服务器收到大量请求,将会出现系统宕机。如果能够将请求转发到消息队列,再由服务器去消费这些消息将会使得请求变得平稳,提高系统的可用性。 如果想学习Java工程化、高性能及分布式、深入浅出。微服务、Spring,MyBatis,Netty源码分析的朋友可以加我的Java高级交流:854630135,群里有阿里大牛直播讲解技术,以及Java大型互联网技术的视频免费分享给大家。 一、开始使用RabbitMQ RabbitMQ官网提供了详细的安装步骤,另外官网还提供了RabbitMQ在六种场景的使用教程。其中教程1、3、6将覆盖99%的使用场景,所以正常来说只需要搞清楚这3个教程即可快速上手。 二

Dependency injection for NServiceBus handler unit testing

时光总嘲笑我的痴心妄想 提交于 2019-12-09 12:09:42
问题 This is how you supposed to inject dependencies for your NServiceBus handler to test it: Test.Handler<YourMessageHandler>() .WithExternalDependencies(h => h.Dependency = yourObj) (http://nservicebus.com/UnitTesting.aspx) However it means my Dependency object reference should be public that I do not like a much. Is any way to keep it private readonly and assign it inside constructor, so that implementation supposed to be passed through the handler constructor only? Thanks 回答1: You can use

Pros/Cons of using BizTalk instead of NServiceBus or MassTransit

风流意气都作罢 提交于 2019-12-09 09:23:44
问题 I am curious if it even makes consider BizTalk for the implementation of a pub/sub messaging architecture (basically what you can do with NServiceBus or MassTransit is all I really need). My manager tends to want to stick with frameworks provided directly from Microsoft and so as part of my due diligence as to which one to use I need to give a good set of pro/cons for both sides. Any guidance would be greatly appreciated! 回答1: One of the major cons of a Broker is that it is very difficult to

How to implement a competing consumer solution?

假如想象 提交于 2019-12-09 08:56:00
问题 As a exercise I'm trying to find an example which implements competing consumer. many producers - > MSMQueue <- competing consumers So far I did not find any documentation on how to achieve this. My first attempt to figure out how is implemented in MassTransit or NServiceBus failed to many layers of indirection. Any help will be greatly appreciated. 回答1: With MassTransit and MSMQ you can achieve this using the Distributor component. Note that if you use MassTransit with RabbitMQ instead of

WebException error 404 after upgrading NServiceBus to version 3.3.8

耗尽温柔 提交于 2019-12-09 03:56:19
问题 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

NserviceBus Gateway Sample

被刻印的时光 ゝ 提交于 2019-12-09 02:46:28
问题 Has anyone managed to get the NServiceBus Gateway component to work? The sample in v3.0 does not work out of the box like other samples. A step by step guide or code sample will be helpful to get this component working. Thanks 回答1: I've fixed some issues and verified that the Gateway sample in 3.0 runs ok just by hitting F5. Please update to the latest version and give it a try. 回答2: Here's a sample of NServiceBus Gateway being used on version v3.0: https://github.com/NServiceBus/NServiceBus

Guid is causing a format exception

做~自己de王妃 提交于 2019-12-08 08:05:57
问题 I'm trying to set up RavenDb 3.5 and NServiceBus 6. After I senter the saga that I have set up in my NServiceBus endpoint, I enter a handler. Once this handler is finished, I get this error: System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). My code: public static class AutoFacConfig { public static IContainer ConfigureAutofac() { var builder = new ContainerBuilder(); var resourceManagerId = new Guid("6c9abcbb-c7ca-4a67-a149

NServiceBus How To Publish Message From 2 Physical Locations Of 1 Logical Service

青春壹個敷衍的年華 提交于 2019-12-08 05:27:02
问题 is it possible to publish a message from 1 logical service that is deployed to 2 physical locations? how would the config file look like? you cannot add a message in your subscriber 2 times. but you must if you want to subscribe to 2 queues. 回答1: Yes, it's very possible. We're doing it right now. The trick is to have either a shared or replicated subscription store. Here's how it works: The subscription request (as defined in your subscriber's application configuration file) is sent to an