- 114
- 512 109
Chris Patterson
United States
Приєднався 30 бер 2006
I'm the maintainer and primary contributor to MassTransit, an open-source distributed application framework for .NET.
MassTransit SQL Transport Dashboard - ResQueue
Using the SQL Transport with MassTransit is a great way to reduce infrastructure costs and dependencies. To go along with it, the community has created a dashboard front-end that visuals the queues and their message counts, and even allows browsing the queues, viewing headers, and tracking queues/messages that are used by job consumers (including recurring job consumers).
Sample: github.com/MassTransit/Sample-JobConsumers
ResQueue: github.com/filipbekic01/ResQueue
MassTransit
Documentation: masstransit.io/
Discord: discord.gg/rNpQgYn
Connect on Twitter (X):
phatboyg
Sample: github.com/MassTransit/Sample-JobConsumers
ResQueue: github.com/filipbekic01/ResQueue
MassTransit
Documentation: masstransit.io/
Discord: discord.gg/rNpQgYn
Connect on Twitter (X):
phatboyg
Переглядів: 854
Відео
Consuming Amazon AWS Notifications using MassTransit
Переглядів 26328 днів тому
Amazon Web Services (AWS) uses its Simple Notification Service (SNS) extensively to route all types of events. In this video, I cover a new sample that shows how to consume SNS events using MassTransit and Amazon SQS. The Simple Email Service (SES) sends bounce and complaint notifications via SNS, and this sample consumes those notifications so that they can be handled by your application domai...
MassTransit v8.3.0 - RabbitMQ ReplyTo Support
Переглядів 1,1 тис.Місяць тому
With MassTransit v8.3.0, it is now possible to configure the ReplyTo endpoint using RabbitMQ. RabbitMQ provides a default ReplyTo address for every broker connection that can be used to send messages directly to the connection without the need to create a temporary queue. Using the new request client, the bus endpoint is no longer used/needed and MassTransit will send responses using the connec...
Scheduling and Recurring Jobs with MassTransit
Переглядів 1,5 тис.2 місяці тому
Get ready for an exciting upgrade with MassTransit! Job Consumers, already a powerful tool for handling long-running tasks, are getting even better. The upcoming release introduces support for recurring jobs using cron expressions, making it effortless to integrate scheduled tasks directly into your applications. But that’s not all-MassTransit now lets you schedule jobs to run later, putting yo...
Using MassTransit with .NET Aspire
Переглядів 2,6 тис.5 місяців тому
In this video, I demonstrate how to create a distributed application using MassTransit and .NET Aspire. A front-end API application along with a back-end consumer service, wired up using the Aspire AppHost, and communicating using the SQL Transport via PostgreSQL. Sample: github.com/MassTransit/Sample-Aspire Aspire: learn.microsoft.com/en-us/dotnet/aspire/get-started/aspire-overview MassTransit...
Commands, Events, Requests, and Responses in Message-based Systems
Переглядів 1,7 тис.6 місяців тому
Within MassTransit, messages take the form of .NET types, which can be records, classes, or interfaces. Yet, these messages also carry their own distinct type. This video explores the diverse message types (or stereotypes, perhaps a more fitting term), such as commands, events, requests, and responses. I delve into when to employ each type and explain how these types are produced and/or consume...
Versioning your MassTransit message contracts
Переглядів 1,5 тис.7 місяців тому
MassTransit uses a type-based routing system to connect producers and consumers so that publish/subscribe messages works across the supported message brokers. One of the common questions about using MassTransit is how to share and version message contracts in an application and/or domain. In this video, I go beyond just sharing message contracts using NuGet and cover several approaches to updat...
MassTransit Message Contract Sharing using NuGet
Переглядів 1,5 тис.7 місяців тому
MassTransit uses a type-based routing system to connect producers and consumers so that publish/subscribe messages works across the supported message brokers. One of the common questions about using MassTransit is how to share and version message contracts in an application and/or domain. In this video, I show how to use NuGet to share a message contract assembly so that other C# .NET projects ...
Using Open Telemetry with the MassTransit Test Harness?
Переглядів 9857 місяців тому
In this video, I talk about a new way to wait for messages to be consumed, along with any subsequently published/sent messages, in response to a publish, send, or request using the MassTransit test harness. While this is only in the pre-release NuGet package currently, let me know your thoughts if something like this is useful for building more consistency unit tests! Support: masstransit.io/su...
MassTransit v8.2.0 Update and SQL Transport Partitioning
Переглядів 1,3 тис.8 місяців тому
MassTransit v8.2.0 will be released soon so in this update I talk about one of the unique features of the SQL Transport's message delivery using the partition key to enable ordered delivery across multiple consumer instances. Support: masstransit.io/support Discord: discord.gg/rNpQgYn Connect with me on Twitter: phatboyg Sponsor me on GitHub: github.com/sponsors/phatboyg
MassTransit Bus Stop - Meet the author of SmashR
Переглядів 5739 місяців тому
In this bus stop, we sit down with Brecht Haveneers, the author of SmashR, and ask about his experience using MassTransit to build a Reddit alternative using RabbitMQ and Azure Container Apps. SmashR: www.smashr.com/ MassTransit Documentation: masstransit.io/ Discord: discord.gg/rNpQgYn Connect with us on Twitter: phatboyg drusellers
MassTransit 2024 Update
Переглядів 2,6 тис.10 місяців тому
In this update, I cover the state of MassTransit, support availability, .NET version compatibility, the SQL transport, and upcoming events. Support: masstransit.io/support Discord: discord.gg/rNpQgYn Connect with me on Twitter: phatboyg Sponsor me on GitHub: github.com/sponsors/phatboyg
MassTransit Bus Stop - Request Response via Messaging (RPC)
Переглядів 3,5 тис.Рік тому
Can I use messaging for request response (RPC)? Sure, why not! In this interactive episode, Chris and Dru talk about request response, and go through a couple samples on how to use MassTransit to send requests, handle responses, and unit test those conversations. MassTransit Documentation: masstransit.io/ Discord: discord.gg/rNpQgYn Connect with us on Twitter: phatboyg d...
MassTransit Bus Stop - SQL Transport Update
Переглядів 1,2 тис.Рік тому
So much progress on the SQL transport since it was first announced. The SQL Database Transport for MassTransit is a game-changing addition that will transform the way you leverage messaging in your applications. In this update, we go over the latest feature set and progress, and provide some details on availability. Sample Project: github.com/MassTransit/Sample-DbTransport (The sample requires ...
MassTransit Bus Stop - 8.1 Updates
Переглядів 955Рік тому
What is coming in MassTransit v8.1? In this episode, Dru and I casually talk about what's coming and what drove some of the decisions made in preparing for the next minor release of MassTransit. MassTransit Documentation: masstransit.io/ Discord: discord.gg/rNpQgYn Connect with us on Twitter: phatboyg drusellers
MassTransit SQL Database Transport - Sneak Preview
Переглядів 2,9 тис.Рік тому
MassTransit SQL Database Transport - Sneak Preview
MassTransit Commute - Endpoint Dependencies
Переглядів 2,1 тис.Рік тому
MassTransit Commute - Endpoint Dependencies
MassTransit Bus Stop - Applying Clean Architecture Principles
Переглядів 2,6 тис.Рік тому
MassTransit Bus Stop - Applying Clean Architecture Principles
MassTransit Bus Stop - Database as a Queue?
Переглядів 1,2 тис.Рік тому
MassTransit Bus Stop - Database as a Queue?
MassTransit Bus Stop - Smart Endpoints, Dumb Pipes
Переглядів 932Рік тому
MassTransit Bus Stop - Smart Endpoints, Dumb Pipes
MassTransit Bus Stop - Sockets vs Brokers
Переглядів 997Рік тому
MassTransit Bus Stop - Sockets vs Brokers
MassTransit Bus Stop - Streams vs Queues
Переглядів 1,6 тис.Рік тому
MassTransit Bus Stop - Streams vs Queues
MassTransit Kafka using AVRO Union Schemas
Переглядів 1,2 тис.Рік тому
MassTransit Kafka using AVRO Union Schemas
MassTransit Kafka, Configuring Topic Producers and Consumers
Переглядів 5 тис.Рік тому
MassTransit Kafka, Configuring Topic Producers and Consumers
MassTransit Kafka with MongoDB Atlas and Confluent Cloud
Переглядів 2,5 тис.Рік тому
MassTransit Kafka with MongoDB Atlas and Confluent Cloud
MassTransit Bus Stop - Sagas, Routing Slips, Orchestration, Choreography
Переглядів 1,9 тис.Рік тому
MassTransit Bus Stop - Sagas, Routing Slips, Orchestration, Choreography
MassTransit - Retrying Faulted Routing Slips
Переглядів 931Рік тому
MassTransit - Retrying Faulted Routing Slips
MassTransit Dynamic Routing Slip Activities, Retry, and Redelivery
Переглядів 1,9 тис.Рік тому
MassTransit Dynamic Routing Slip Activities, Retry, and Redelivery
MassTransit Routing Slip State Machine and OpenTelemetry
Переглядів 2,1 тис.Рік тому
MassTransit Routing Slip State Machine and OpenTelemetry
MassTransit Routing Slip Arguments, Variables, and Unit Testing
Переглядів 1,9 тис.Рік тому
MassTransit Routing Slip Arguments, Variables, and Unit Testing
In a requestresponse message where is the replyTo set? in the requestclient? in the consumer? both? thanks in advance
In the request client.
Thanks for your walk-through with MassTransit, I noticed the fork link you uploaded on github don't have changes you made in this video.
Awesome discussion going on. I will be using MassTransit and in place of IMediatR hoping it will work great :)
Amazing! 🙏 Filip is an incredible talent.
Thanks Chris for uploading the video. As you mentioned, this project is the beginning of a UI for MassTransit SQL transport, and we're definitely open for PRs. I'll be putting in more work on it soon. And yeah, dark theme is there, I just need to add switch button in some of future releases.
It's a great start! I'm excited to see it progress.
Can we get such dashboard for other queues like RabbitMQ and Kafka?
Other transports work differently, but this library is specifically designed for SQL due to the unique way it operates.
As stated above, the project is open to pull requests. However, others brokers have their own UI's, this project is focused on the SQL Transport. There are plans for viewing jobs, recurring jobs, etc. and that's based on the saga state machines (again, querying the database).
Nnnnnnnoice!
Hi Chris, great work. Would it be possible to add an overload to allow the option to set a routing key when adding a recurring job? The publish allows it but the new wrappers don't have a way of passing the values in. Thanks again
Despite the masstransit interfaces are simple or ef/nhibernate have abstractions that implement unit of work, they are still vendor-dependant and I prefer to keep my domain and application layer free of vendor code
What do you really mean by vendor code?
Thank you very much! I can't thank you enough!
For all of this to work, is the Saga required? I have a web api that publishes to a Consumer, and then a Handler picks up the message and does the work in another service. This works. However, when the consumer service publishes another message, it does not get consumed by the secondary consumer. I have no clue why this isn't working. Any tips?
If you need help, I'd suggest going through one of the valid support channels. masstransit.io/
Thank you Chris! It is awesome!
Thank you for this functionality. I will give it a try. Is it possible for you to briefly touch on those “issues” with ReplyTo that you talked about in the video?
Hah, I knew somebody would catch that comment. Since there isn't technically a queue, if the broker connection is lost and a new connection created, that replyTo address may change upon reconnection making any previous responses undeliverable.
@@PhatBoyG Makes sense, thanks for the tip.
1) Is there any difference in performance between the old and new approach? Or we just not wasting time creating a temporary queue anymore? 2) I have to turn on new feature both at client and server, right? What if part of the clients will be without this feature?
1. It's technically like 2-3% faster, at least in my benchmarks 2. You only have to turn it on at the client, any MassTransit v8+ already has support for it.
@@PhatBoyG Thank you!
In case anyone missed, he has a setup which automatically deletes everything on the broker before reconfiguring 1:19
13:45 line 33 await context.Execute(routingSlip) 1、does this two activitys will run in parallel or in order ? 2、if AllocationInventory activity faulted, does PaymentActivity will hit its compensation ?
1. in order 2. If allocate inventory faults, payment activity is never executed.
@@PhatBoyG nice ! Thanks Chris!
Not mentioned in this video, but I see Job Distribution Strategies were delivered in 8.3.0. This is huge for folks building multi-tenant apps that unfortunately have to route jobs for some clients to specific machines. I'm really excited to try it. Thanks!
I pulled job distribution from the concepts column after this video was published, but yes, that's coming as well and already in the documentation.
@@PhatBoyGfor some reason I thought 8.3.0 had already been released. My mistake. Looking forward to it then!
@@michaelgraf4612 Only the pre-release builds are available now, under the 8.2.6-develop lineage.
Very nice stuff! 🙂 When is this going to land on main branch? 🙂
The next release will have it, either 8.2.6 or I might bump to 8.3.0 since it's a schema change on the job service sagas.
Is that the most simple and minimal way to set up mass transit when I don’t want to hook it up to a transport and just use the outbox?
I recently added MassTransit to my toolkit, and I’m really happy to see these videos. Great work, and thank you for everything especially bringing SQL Transports for smaller projects! In addition, how would you requeue failed messages after you fixed the problem in the consumer from SQL Transport?
The next release will have a requeue messages function that can be called using SQL to move messages from the error or dead-letter queue back into the queue. It's already in the pre-release NuGets.
Can recurring jobs be used with Azure servicebus or only with Postgres?
Any transport can be used, for Azure Service bus, you'd just change the SQL scheduler to the UseServiceMessageMessageScheduler.
Amazing library but so complicated to use it.
Building distributed systems is hard. MassTransit makes it easier, but the complexity cannot be avoided without serious downstream consequences. This isn't beginner-level material, it's for people building durable, reliable applications that operate at scale. That stated, there are over one hundred videos and more than a dozen samples showing how to use MassTransit, not including content created by others.
Please lower your noise cancelling on your recording. It was hard to listen to.
I'm not sure what happened, the audio is normally fine but this video's audio is really off. Some of the tools I use were updated, I wonder if they somehow changed a setting.
Cool stuff! This is probably capable of scheduling messages in single digit second frequencies, I assume? I'm currently running a selfmade redis round robin lock-based scheduler, but I would like to replace that one. I didn't use Quartz yet, but Hangfire did fail miserably at frequencies of <5 seconds, hence the question.
I mean, technically it should be capable of that, but this is not meant to be a generalized scheduling solution. I have other videos giving more details on what job consumers are and how they should be used that might be worth watching.
is sql server supported in the transactinal outbox feature?
Can we have two Initially in our state machine Chris if we can have different scenarios in one saga? Thanks for your awesome tutorials!
Yes, you can have as many as you want.
Seems like I still did not achieved the level of enlightenment necessary to understand this Sagas stuff 😂Great guru Chris achieved high state of enlightenment I assume.
👍👍🔥🔥
This is very helpful. I know you were showing events generated from the api itself. If you wanted to do something like this to have a out proc cqrs system. Then have a application services consume the data and then fire off the commands to Kafka topic and then Command Handlers to consume and then Event process starts. What are you thoughts on that?
Great video! One question: What would you see in the Aspire tracing when you add the MassTransit tracing to the ServiceDefaults? And also for the MassTransit metrics of course?
It was added to the sample now, so, I guess you see the message consumption/processing!
We are currently using a git submodule instead. Works just as well for us.
I downloaded the Sample from github and upgraded to .NET 8.0. I find the Queues and Topics being created, the I see the Temp Queues being created, but no Messages are exchanged. If I use a direct Message Retrieval off a Queue using Service Bus Nugets, that works, but the MassTransit code does not work as expected. Your video does demonstrate the message exchange, so I am not clear what the problem is.
Review the logs, see what's happening or not happening. If you need help, check the web site for support pathways.
Is there any content about the usage of masstransit with topic queues ?
ua-cam.com/video/0BbazfX_Tf4/v-deo.htmlsi=deosOvgv2k-XdSoU&t=196
great feature 👍
Chris thank you so much for this content, I don't care if microsoft are trying to add their own abstractions for messaging, MassTransit will always be my go to. You have thought of everything!
Thank you for providing the video content. It was hard to grasp the docs at first but I am 100% on board now after a couple months, and absolutely love MT!
I tried to implement it but kept receiving a "task was canceled" error. Sometimes it works, sometimes I get this error
what if i need to use request response pattern? i use C# but i can also use python or other languages.
Hi Chris, I was thinking how would the persistence layer act when it has a stream of v1 events already stored and now it needs to be able to process v2 events (think field renamed, field deleted, field added, field split, field joined - type of scenarios). In absence of a new explicit type it would be tricky to distinguish between v1 vs v2 event handling and re-hydrate the state of an Aggregate / Business Object. Which means apart from a Contracts package version increment I'd probaby treat the old event types and their schema as immutable, unless the underlying consumers use non append-only storage mechanisms (aka not event sourcing). If you have desire & time to exand these cases on a v2 video, I'd be infinitely thankful.
Very useful, thank you
I've been using MassTransit for a couple of years now. I've always suffixed messages to make sure it's clear what message type they are. Like: *Command *Event *Request *Response. I see you're never doing that, is that intentionally? I'm also always adding a CorrelationId to every message type, is there any good reason to not always include that?
So, if I am understanding this correctly, your 'OrderRoutes' class builds a public http api that in turn uses the RequestClient to 'submit' the order, and then returns an actual Accepted or Rejected response from the Consumer (using ResponseClient) to the api caller. This is an alternative to the usual design where the http api would 'publish' the order to the bus and return a simple 'OK'. Then the api caller is responsible for separately calling the 'get' api to see if the order was actually Accepted or Rejected. Is that a reasonable take-away? It makes sense at the edge (the public http api) but am I correct that this would make less sense once the message is hopping along from consumer to consumer (as in a saga)?
Correct, there are actually two routes, one POST and one PUT. The PUT just publishes (your alternative) and returns Accepted immediately (not using the request client). Once inside the service boundary/bounded context, a mix of commands and events are more common, but I still see extensive use of request/response but initiated from sagas instead of consumers (since sagas don't have the call stack sitting around waiting for the response). I cover this elsewhere in a mix of routing slips, durable futures, and regular consumers.
Is it possible for downstream consumers to subscribe to response messages?
They cannot, responses are sent directly to the ResponseAddress header added by the request client. They are not published, and published messages are not handled by the request client on the bus endpoint.
Thank you for the clear explanations. it is a little confusing to have a request client send commands when there is a clear distinction between requests and commands so appreciate bringing it up.
Chris Patterson, Do you have any video showing how to deliver same message to multiple consumers using Azure Service Bus?
masstransit.io/support/support-channels
ua-cam.com/video/bsUlQ93j2MY/v-deo.html
Hi Chris, any video on major updates of contracts coming?
Define major...
@@PhatBoyG property name change :)
@@tszm88 My first comment is don't, but you can typically handle it with multiple JSON properties to tell the serializer to accept the old name and the new name on the updated contract.
@@PhatBoyG sounds valid. In a big distributed system we major version contracts and usually its causing us issues. E.g. For Saga when we want to bump a contract with major change and we wont change the name of the registered Event inside the saga - it leads to creation of _skipped queues on the service bus (since the subscription to the saga queue is not clean up properly...). I guess your advice would be to not major version, but I think its too late to do that. The saga still works flawlessly but the skipped queue is a a pain to have.
I'm missing how you should handle the scenario when a consumer receives a message that has an enum value that is not understood. Sure enough, when you upgrade everything like you did, it works, but a common situation is that you deploy a service that emits values that might not be compatible to an older contract (with regards to the enum values). There are ways to get around it, I know, but it would be interesting to hear your take on it. Thanks a lot for your videos!
If you're producing events, I'd be unlikely to use an enum in the event simply for that reason - new values would break consumers with an older version of the contract. For commands/requests, the owner is the service and you'd be able to manage upgrading the service instances before upgrading the clients to pass the new enum value.
Thanks for the good content as always! Seconding the interest in videos about feature management
8:38 . The condition is "if(!string.IsNullOrEmpty(context.Message.PurchaseOrderNumber) - thats why u did not get the warning message
Yep, that's why!