by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 21:01
    Build #2775 passed
  • Jun 03 17:25
    Build #2774 passed
  • Jun 03 15:41
    Build #2773 passed
  • Jun 03 15:16
    Build #2772 passed
  • Jun 03 14:38
    Build #2769 passed
  • Jun 03 13:26
    Build #2768 passed
  • Jun 03 11:47
    Build #2767 passed
  • Jun 02 17:17
    Build #2766 passed
  • Jun 02 11:12
    Build #2765 passed
  • Jun 02 08:53
    Build #2764 passed
  • Jun 02 01:31
    Build #2763 passed
  • Jun 01 16:37
    Build #2759 passed
  • Jun 01 16:05
    Build #2758 passed
  • Jun 01 09:58
    Build #2757 passed
  • Jun 01 09:34
    Build #2756 passed
  • Jun 01 07:51
    Build #2755 passed
  • May 30 16:32
    Build #2749 passed
  • May 29 20:10
    Build #2748 passed
  • May 29 16:13
    Build #2747 passed
  • May 29 14:52
    Build #2746 passed
behrygood1982
@behrygood1982

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"?

Thanks!

Chris Patterson
@phatboyg
@behrygood1982 I'd suggest watching this video: https://youtu.be/P41IsVAc1nI
behrygood1982
@behrygood1982

Hey @phatboyg

Thanks for posting those videos. I started it but haven't finished it yet. Would u atleast say my understanding is correct or incorrect?

Chris Patterson
@phatboyg
@behrygood1982 there are differences, the video and related blog post explains how the MassTransit Outbox works.
marounBalaa
@marounBalaa
Hello everyone, I just have a quick question. Why is MassTransit unable to consume D2C messages sent from vs code ( azure sdk) to iot hub ( messages are routed to azure service bus and massTransit consumes from azure service bus). is it because of the
message format ?
thank you in advance
ps: the D2C messages are automatically dead lettered in azure service bus queue
marounBalaa
@marounBalaa
thank you for your help
ntziolis
@ntziolis
@phatboyg Thought you might be interested to know that it is indeed possible todo request/response with a single queue when using Azure Service Bus. The documentation was a bit vague so i asked to clarify and maybe update the doc, here is the response
https://github.com/MicrosoftDocs/azure-docs/issues/54160#issuecomment-628339131
https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-sessions#request-response-pattern
Chris Patterson
@phatboyg
@ntziolis documentation aside, I'd need to see working code before I believe it. And it is doubtful that I'd put this into MassTransit given the edge case.
Michael Dillon
@grummle_twitter
When doing a Publish we are trying to set a message header on the Azure Message Bus message itself. Not in the MT envelope. Should we be doing this as part of the Publish call or somewhere else. Intention is to have one of the properties from the message itself available on the AMB header so it can be filtered down stream
Chris Patterson
@phatboyg
@grummle_twitter you need to set a MassTransit header, and the transport header will be set using the same header name.
Tidus
@tidustr_twitter

Hello everyone,
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?

Chris Patterson
@phatboyg
@tidustr_twitter sounds like a class assignment, or something. But to answer your question, not really, no.
Tidus
@tidustr_twitter
@phatboyg ok, thank you.
behrygood1982
@behrygood1982
Is anyone using de-duplication within their masstransit applications to deal with duplicates? If so, how are they ensure creating deterministic message id's at the publisher side in order to deal with possible retries?
ntziolis
@ntziolis
@phatboyg This was merely meant as info. I thought you would be interested to understand that those capabilities are there. This wasn't meant as gotcha or ask to implement. ;)
Chris Patterson
@phatboyg
@behrygood1982 If I needed it, I'd likely front-end the process using a saga to orchestrate the process, and to ensure that subsequent commands for the same operation aren't initiated. As for identifiers, using real world identifiers is often the best choice, though just de-duplicating on an ID is a bit idealistic. In real applications, it is better to focus on business identifiers that have tangible value to identify potential duplication.
Ryan Kelley
@ryankelley
@phatboyg I am in the process of upgrading us from 5.2 to 6.3, and have a question. We have been using a custom Redis Saga Repository, to handle concurrency etc.. for the last few years, but mostly because those features were missing from the OG redis persistence. We have upgraded StackExchange.Redis across our entire stack included official signalr from Microsoft into the 2.x land, any reason MassTransit relies on 1.2.6 still? I'm happy to do the upgrade and PR that work, just didn't want to do it if there was a reason hanging out there for it not being done.
Chris Patterson
@phatboyg
@ryankelley the v7 branch is currently using: Include="StackExchange.Redis" Version="2.0.601" />
benrahn7
@benrahn7
@phatboyg have you worked with using an angular front end using masstransit? Would you recommend just creating messages from an api that the js frontend uses?
Chris Patterson
@phatboyg
Essentially, yes. The JS calls the API endpoint, and the endpoint does initial validation/auth to ensure the command has a high chance of success (like 99%) and then sends it.
IF it's more of an ask than a command, I've published them as events. It's the difference between SubmitOrder and OrderCancellationRequested
A UI could request an order to be cancelled, but it can't cancel it because it might have already shipped.
Xi Shen
@davidshen84
Hi, I am trying to use the "CreateUsingInMemory" method for testing. But I got The host is not ready. error.
Xi Shen
@davidshen84
Ah...I think my problem is, in MassTransit v6, when using InMemory, can I get a reference to the IHost and access its address.
Chris Patterson
@phatboyg
Are you starting the bus at some point? If you're using In-Memory, I'd suggest looking at the Test Harness
fujee
@fujee

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?

Igor
@Perkovsky
Hi! Could you explain how to use queue priority with ActiveMQ?
Chris Patterson
@phatboyg
@Perkovsky when sending or publishing, you can set the priority using an extension method in the ActiveMqTransport code on SendContext.
endpoint.Send(message, context => context.TrySetPriority(priority))
Igor
@Perkovsky
@phatboyg Thank you for your answer. Do I need to configure ActiveMQ from MassTransit to use priority?
Igor
@Perkovsky
@phatboyg I configured ActiveMQ according to the documentation. I used this code 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?
Chris Patterson
@phatboyg
Well, change it from TrySetPriority to SetPriority to make sure it's being set. Beyond that, I don't have any suggestions.
Igor
@Perkovsky
@phatboyg Thank you.
mdx0111
@mdx0111

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.

Maciek Misztal
@mmisztal1980
@phatboyg given I use ConfigureConsumer(IRegistration, Type) - is there any recommended way to set up the filters for my consumer when using this method?
Chris Patterson
@phatboyg
@mmisztal1980 you should create a definition for your consumer, that configures the middleware in the Configure method. Be sure that your definition is either registered with the consumer (during AddConsumer) or discovered from the assembly using AddConsumersFrom... https://masstransit-project.com/usage/containers/definitions.html
Maciek Misztal
@mmisztal1980
right, thanks :) I'm also looking at the Filters, I need to extract the correlation Id and attach it to a logging scope in Serilog, while the remainder of the processing pipeline executes. Should that be done in a Filter? (If so - how?) or should I use a IMessageAuditStore?
Maciek Misztal
@mmisztal1980
now that I think of it, I also need to decorate the ougoing messages' headers :/
Maciek Misztal
@mmisztal1980
Any suggestions @phatboyg ?
Chris Patterson
@phatboyg
Well, @mmisztal1980 you should join the Discord for one...
Logging seems like an observer, whereas changing headers seems like a filter.
Maciek Misztal
@mmisztal1980
oh, so gitter is being phased out in favour of discord?
Jussi Mattila
@jussimattila
I have request/response message flow. It appears that response objects are reused for multiple invocations. Is that correct? And is it by design? When I send a request and get back a response, then send another request, MassTransit reuses the previous response object. If I hold on to the previous message response, its content are "overwritten" by the latest response. My gut reaction is that this is wrong, MassTransit should create a new message response object for every request. Have I misunderstood something?
Jussi Mattila
@jussimattila
Nope, error on my end, there was a static field being reused! Responses are indeed created but the payload had a field that was backed by some static data.
Saeed Ganji
@shahabganji

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?

Chris Patterson
@phatboyg
Just a reminder, this room is infrequently monitored, community support is on Discord: https://discord.gg/rNpQgYn