rebus

How does Rebus work with Azure Service Bus topics?

白昼怎懂夜的黑 提交于 2020-05-29 05:14:11
问题 I'm new to Rebus and Azure Service Bus and would like to understand how Rebus works with Azure Service Bus topics and queues. I've managed to successfully get Rebus to work with ASB but am a bit puzzled as to what's going on under the covers. I have an ASP.NET Core application that configures Rebus as follows: services.AddRebus(configure => configure .Logging(l => l.Serilog()) .Transport(t => { switch (messagingConfig) { case MessagingConfig.RabbitMq: t.UseRabbitMqAsOneWayClient

How does Rebus work with Azure Service Bus topics?

馋奶兔 提交于 2020-05-29 05:13:28
问题 I'm new to Rebus and Azure Service Bus and would like to understand how Rebus works with Azure Service Bus topics and queues. I've managed to successfully get Rebus to work with ASB but am a bit puzzled as to what's going on under the covers. I have an ASP.NET Core application that configures Rebus as follows: services.AddRebus(configure => configure .Logging(l => l.Serilog()) .Transport(t => { switch (messagingConfig) { case MessagingConfig.RabbitMq: t.UseRabbitMqAsOneWayClient

Rebus subscriber-publisher system. Process message only by single subscriber

浪尽此生 提交于 2019-12-24 15:37:58
问题 I have system with one publisher several subscribers. But some messages should be processed only by single subscriber. In my case publisher sends message about changing data in database, all subscribers has access to the same database, but I don't need them all change the same data. How can this be accomplished using rebus? PS. Forgot to mention. I can't subscribe to the message only with one subscriber, because subscriberss can go online/offline all the time. 回答1: But some messages should be

How can I let Rebus determine an endpoint for an interface and not for an implementation of that interface

核能气质少年 提交于 2019-12-23 21:20:53
问题 When I Send an instance created by AutoMapper.Mapper.DynamicMap() I run into an error where Rebus seems to want to determine an endpoint for proxy type returned by DynamicMap. This instance will contain an implementation of T assuming T is an interface type. Is there a way in which I can let Rebus determine an endpoint for the interface type T and not for the implementing type returned by DynamicMap()? I tried playing around with IDetermineMessageOwnership but had no luck so far. public

How to configure a Rebus endpoint to run as a service

纵然是瞬间 提交于 2019-12-13 00:36:09
问题 I am trying to use Topshelf to create a Rebus endpoint that will run as a service. How should this be set up and are there any examples? 回答1: You can take a look at the Rebus samples repository, where the integration service sample in particular shows what you're after. As you can see in Program.cs it uses Topshelf to basically just hold on to a Windsor container, which it disposes when the application shuts down. The Castle Windsor installer syntax causes the installers to be automatically

Rebus and Remote queues

折月煮酒 提交于 2019-12-12 13:51:21
问题 I'm using Rebus (https://github.com/rebus-org (v.0.83)) and until now it's been all local to a single machine. Now I need to use a remote queue from my website to an app server. It's not abundantly clear to me how to set this up with Rebus. A few questions I guess I need MSMQ on both machines (web & app) correct? I've configured the web site to UseMsmqInOneWayClientMode ; or is there a way to specify to send it over http? My configuration looks like this more or less. I'm guessing that

Pub sub pattern with centralized subscription storage using Azure Service Bus

回眸只為那壹抹淺笑 提交于 2019-12-11 13:40:01
问题 I am new to Rebus, and try to run the app below with Azure Service Bus, but I got the error below: https://github.com/rebus-org/RebusSamples/tree/master/PubSubCentralized System.InvalidOperationException HResult=0x80131509 Message=Attempted to register primary -> Rebus.Subscriptions.ISubscriptionStorage, but a primary registration already exists: primary -> Rebus.Subscriptions.ISubscriptionStorage (The Azure Service Bus transport was inserted as the subscriptions storage because it has native

How to configure Rebus to have topics based on handlers' type

别等时光非礼了梦想. 提交于 2019-12-11 11:46:11
问题 I'm using Rebus and I want to introduce something like described in CQRS Journey at paragraph " Avoid processing events multiple times ", but I cannot figure it out. I configured Rebus to use SQL Server for Transport and MongoDB for Subscriptions and Sagas . The Routing is configured TypeBased and maps all the commands handlers' types to the queue configured in Transport . var bus = Configure.With(new SimpleInjectorContainerAdapter(container)) .Logging(l => l.Trace()) .Transport(t => { t

Pause the worker from getting messages from the queue

匆匆过客 提交于 2019-12-11 07:47:05
问题 I have been to trying find out if there is any way to pause the worker from taking more jobs/messages from the Rebus queue? I want to be able to "disable" a worker through my GUI so that it finishes the job its currently working on (if any) and then stops taking more jobs. Then if I want it to start taking jobs again, I signal this via the gui. My worker setup for Rebus looks like this: private void SetupRebus(int numberOfWorkers, string messageName) { _adapter = new BuiltinContainerAdapter()

Rebus, exception when creating AppDomain / Instance from async Handler

南笙酒味 提交于 2019-12-10 23:31:02
问题 We have a problem with the new (async) version of Rebus that didn’t exist with the older version. When handling rebus message and trying to create AppDomain and Instance to run plugin code dynamically, it always give me an exception. To make the example as simple as possible, I made a Test method: public static void Test() { AppDomain ad = AppDomain.CreateDomain("Test"); Loader loader = (Loader)ad.CreateInstanceAndUnwrap(typeof(Loader).Assembly.FullName, typeof(Loader).FullName); } class