MassTransit Message Contract Sharing using NuGet

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 9

  • @kevbite
    @kevbite 9 місяців тому +1

    How do you deal with enum values that change (or additions) within contracts?

    • @PhatBoyG
      @PhatBoyG  9 місяців тому +9

      Good question, I'll cover that in the next video on versioning message contracts!

  • @Wfmike
    @Wfmike 9 місяців тому +1

    Regarding versioning, have you had to integrate this with IFeatureManagement, i.e. feature flagging? What would be a recommended approach? (something in the consumer definition?)

    • @PhatBoyG
      @PhatBoyG  9 місяців тому +3

      Using feature flags/toggles/switches with messaging is similar to using them with databases. You have to ensure 100% backwards compatibility for the on/off states. I'll see if I can discuss this in either a subsequent video or a separate bus stop on feature toggles on their implications.

  • @logantcooper6
    @logantcooper6 7 місяців тому

    We are currently using a git submodule instead. Works just as well for us.

  • @Wfmike
    @Wfmike 9 місяців тому +3

    tip: make sure you dont use struct as well as primary constructors

    • @PhatBoyG
      @PhatBoyG  9 місяців тому +2

      Correct, messages _must_ be reference types (records, classes, or even interfaces).

    • @logantcooper6
      @logantcooper6 7 місяців тому +1

      ​@@PhatBoyGisn't the preference an interface?

    • @PhatBoyG
      @PhatBoyG  7 місяців тому +1

      @@logantcooper6 not since records were introduced, at this point, records are my favorite for message contracts.