MassTransit Bus Stop - Request Response via Messaging (RPC)

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024
  • НаукаНаука

Комментарии • 10

  • @marna_li
    @marna_li Год назад +3

    Recently, I did confuse the request type for the response type. No message came through, but no errors. It took me a couple of hours to discover that. Then I just: "Damn how obvious"

  • @OJnotgoing
    @OJnotgoing 10 месяцев назад +1

    Great video and great feature, thanks! Regarding sending requests over Saga/SM, what if I want to enable multiple clients to send me requests? will the response message be sent to all of them? how will MT know which client sent that specific request?

    • @PhatBoyG
      @PhatBoyG  10 месяцев назад

      That depends, there is a RequestStateMachine in MassTransit that can track multiple requests and respond once the operation completes.

  • @gankat4968
    @gankat4968 Год назад

    Thank you for Sharing video! Please can you share repo/video/info on Masstransit Request-Response with Generic Message Type also

  • @hkntn9112
    @hkntn9112 8 месяцев назад

    I watched a couple of videos and most of them has vague comparison, like this one, about comparing something to a db call. In my opinion it is not a good and correct comparison. For instance in this video the comparison was 250 call/sec db call to 2500req/sec request, the 250 number derived from a single operation taking 4 ms, but no concurrency considered. But I guess the 2500 req/sec number is a statistic calculated from a benchmark in a 16-core 32 thread cpu using wall clock .Which in fact it did not took a second but in reality took AmountOfConcurrency x 1 second. For the simplicity lets say 32, so it took 32000 milliseconds to perform 2500 request, which resulting 12.8 ms per request. So the correct comparison should be 4ms for a db operation to 12.8 ms for a request, resulting a very different picture than you portray.

  • @mechanism-o4h
    @mechanism-o4h 11 месяцев назад

    Why you use "init" in contract models? I use only "get" in my project and it's work perfect.

    • @PhatBoyG
      @PhatBoyG  11 месяцев назад +2

      System.Text.Json requires either `get` or `init` to properly serialize/deserialize a property. So typically a record with get;init; is recommended.

  • @alex-ou7nz
    @alex-ou7nz Год назад

    What is the best practice to cope with situations where we can have more than 3 semantic responses. Just live with MassTransit limitations?

    • @PhatBoyG
      @PhatBoyG  Год назад +4

      PR's are accepted, but seriously, why so many different responses? Yes, No, Failure - what else is there? Yes, Yes sorta, Yes maybe? OMG NO? No chance? No how? I'd simplify your message model first, honestly.

    • @Qrzychu92
      @Qrzychu92 Год назад

      I guess you would need to use something like OneOf and have one repsonse inside with a discriminator. Are coming from functional programming that you want this type of response? :)