I was wondering if anyone could verify my understanding of outbox?
My understanding is that the In-Memory outbox feature of MassTransit pretty much works like this.
"Instead of the developer having to order their sends/publishes in a very specific way causing possibly causing ghost messages we are just going to batch them up and do them after the consumer code has executed by the servicebus framework for you"
NServiceBus essentially implements this as described here https://docs.particular.net/nservicebus/messaging/batched-dispatch
That being Said, NServiceBus also implements the outbox pattern where your database transaction for your business entities is used to stor outgoing message in a table so that the database commit happens int the same transaction as the business data. Ignoring the fact that NserviceBus ALSO does other things in their outbox pattern can anyone explain how commiting mesages to the same database and in the same transaction as your business entities is even applicable anymore when you have delayed sends that happen just like mass transits "in-memory outbox" and NServiceBus's "batched dispatch"?
I wonder if there is an easy way to implement following case with MassTrasit.
For example multiple users requested to generate files at the same time.
First user requested 1000 files.
Second user requested 500 files
Third user requested 250 files.
If the concurrent execution is set to 1 then file generation should be like;
First user > one file
Second user > one file
Third user > one file
First user > one file
And so on.
If the concurrent execution is set to 2 then file generation should be like;
First and Second user > One file for each
Third and First user > One file for each
Second and Third user > One file for each
and so on.
This way if a user who requested less files to be generated will not have to wait others to finish first.
Is there a existing pattern to handle this case?
Hi @phatboyg , I have already addressed you once due to problem with the request-response and sagas.
When the first time I started the services one of the messages was lost, each time it worked properly.
Then you found a bug and updated the version of mastransit.
Feb 24 03:05 @hsynls I just pushed the change to develop, once it builds I'll be releasing 6.2 (which has a bunch of updates, AND the fix for @fujee on threading
Now I have a simular problem.
I have multiple sagas that communicate with each other through commands and events.
The first time I start the services, one of the saga sends a event, but the other saga doesn't catch it, but every next time it works properly, no matter how many times I start the process again. So after all services restart and reconnect to rabbitmq it happens again, one event is not captured by one of the sagas. Also it is not the same type of event that is lost.
I tried again after recreating the virtual host (fresh exchanges and queues),
I also tried using "(context.CreateConsumeContext ()).Publish<IEvaluated>(new Evaluated())" instead of "sagaContext.Public(new Evaluated())" but I could not find the reason why the message failed to reach the second saga.
It's as if for some reason the first time some binding was not done and the message was lost, and every next time it works properly.
Have you encountered a case like this before and do you know what I could try?
endpoint.Send(message, context => context.TrySetPriority(priority))
endpoint.Send(message, context => context.TrySetPriority(MsgPriority.Lowest)), but I got the default priority = 4 in the queue for the sent message. What have I done wrong?
I'm working on a project using a Micro Service Architecture. We expose all our API's using asp.net core 2. Internally we use MassTransit to communicate between all the micro services. We recently added asp.net core authentication + IdentityServer. This allows us to use oauth2 and Single Sign On.
But this requires that a security token / cookie / httpcontext be preserved in the inter-micro service communications.
What is the correct approach to this from a MassTransit point of view? At the simplest level, is just possible to preserve httpcontext headers (using GreenPipes?), or preserve the httpcontext in a more robust way? Or is there a more sophisticated approach to access control and sercurity in MT?
@michalsteyn Hi Michal,
Did you find any solution to your problem? I'm exactly in the same situation and I'm having difficulty in finding any solution to this problem. I wonder if you could share your experience please.
Hi everyone, I am newbie to MassTransit, and I want to add OpenTelemetry with Zipkin to my projects, I handled the configurations for my API endpoint app, ASP.NET Core, but adding same configurations in my service workers, which my MT sagas and consumers reside, has no effect and does not provide any metric to Zipkin.
does anyone know how to configure that?