nservicebus

Deffering messages with nservicebus

二次信任 提交于 2019-12-31 04:19:04
问题 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

Updating the steps in Saga

ε祈祈猫儿з 提交于 2019-12-25 12:33:07
问题 I am looking for a way to change the steps in the saga, example: insert a step during the processing, preferablly during runtime Is it possible to do using sagas? 回答1: Sagas (particularly those written using Automatonymous) were not designed to handle dynamic configuration at runtime. They are a codified way to create process monitors and workflows. If you need to dynamically modify the steps of a workflow, you could use the Courier routing slip, which is built into MassTransit. It allows an

NServiceBus chokes on Generic DTO

≡放荡痞女 提交于 2019-12-25 11:57:44
问题 If I have a DTO that looks like this: public class MyMessage<TContent> : Message { public TContent Content {get;set;} } NServiceBus chokes trying to dynamically generate concrete definition for TContent at startup - which's obviously impossible - unless it's smart enough to not only parse Types but also opcodes and I don't think we're there yet. Is there a way around this or I simply can't have generics in my DTOs? 来源: https://stackoverflow.com/questions/19258936/nservicebus-chokes-on-generic

Connecting an NServiceBus gateway on an Azure Service Fabric stateless service

我们两清 提交于 2019-12-25 09:36:41
问题 We are running into difficulties when trying to set up a gateway. I can get it running fine locally, similar to the documentation you provided, but once I need to change the localhost addresses, things start to break down. Our first endpoint runs on a Windows Service (external service), our other endpoint runs on the Azure Service Fabric, specifically within a Stateless service running Web API. We are accessing the service through a remote proxy, which is necessary to contact a service within

Cannot resolve IMessageSession with CastleWindsor in NServiceBus - 6.x

我怕爱的太早我们不能终老 提交于 2019-12-25 09:18:01
问题 I am using NServiceBus v6, with NServiceBus.Host. I am not able to resolve the messageSession object. What am I missing? var container2 = new WindsorContainer(); Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory); log4net.Config.XmlConfigurator.Configure(new FileInfo("logging.config")); LogManager.Use<Log4NetFactory>(); endpointConfiguration.DefineEndpointName("Strategy.Service"); endpointConfiguration.UseSerialization<JsonSerializer>(); endpointConfiguration.UsePersistence

Is it possible to get at the current incoming NServiceBus message?

[亡魂溺海] 提交于 2019-12-25 03:24:43
问题 Using NServiceBus 4 it is possible to get at the message being handled by the current thread? IBus offers a CurrentMessageContext, but not the current message itself. We would like to access the current message from our Ninject bindings so that we can control what types to inject into our message handlers. 来源: https://stackoverflow.com/questions/25689768/is-it-possible-to-get-at-the-current-incoming-nservicebus-message

Are orchestration services unfit to implement a workflow process?

筅森魡賤 提交于 2019-12-25 02:58:24
问题 i'm facing with a problem during the implementation of a workflow process with nservicebus, i use version 2.0.1329.2 and the workflow i'm trying to implement is quite simple: I have a List of articles that need to be computed, the workflow starts with the first list published. After that the user can do other publish adding or deleting some articles from the original list. Every list has a code identifier. I have implemented it using an orchestration service identified by the list's code. In

Why does NServiceBus Saga timeout request use wrong Saga ID?

筅森魡賤 提交于 2019-12-25 01:44:29
问题 My Saga message handler (configured as ISagaStartedBy) requests a timeout message for every message received. Debugging through a few messages at a time, I've found the time the first time the handler is fired, the saga ID sent to the timeout manager is different to the one a) persisted in the database and b) the saga ID sent in subsequent messages. The subsequent messages all send the Saga ID from the database. Here's the handler: public void Handle(PaymentRequested message) { int

Why does NServiceBus Saga timeout request use wrong Saga ID?

不想你离开。 提交于 2019-12-25 01:29:00
问题 My Saga message handler (configured as ISagaStartedBy) requests a timeout message for every message received. Debugging through a few messages at a time, I've found the time the first time the handler is fired, the saga ID sent to the timeout manager is different to the one a) persisted in the database and b) the saga ID sent in subsequent messages. The subsequent messages all send the Saga ID from the database. Here's the handler: public void Handle(PaymentRequested message) { int

NServiceBus sending information when a subscriber subscribes

爷,独闯天下 提交于 2019-12-25 01:23:03
问题 I'm just getting started with NServiceBus and I've got a very basic implementation up and running - much like the PubSub sample application. What I want to do is to send some information when a subscriber subscribes. For example, lets say I have a database with products that are categorized. My publisher will check the database every N seconds and will send messages when a new product is added to the database. But each subscriber is only interested in a particular category and I want to send