On definitive failure of the picture or audio slip, the saga now reaches a
Failed state and recovers end-to-end:
- Picture/audio track slips carry TrackId + ProcessKind variables and a
subscription to a fault translator (TrackProcessingSlipFaultConsumer) that
turns RoutingSlipFaulted into a typed Track{Picture,Audio}ProcessingFailed
- The saga stores the final object keys from the start event and, on failure,
transitions to Failed and publishes TrackProcessingFailed
- TrackProcessingFailedConsumer runs a cleanup slip that removes the orphaned
final picture/audio copies and marks the track LifeCycleStatus=Failed
(MarkTrackAsFailedActivity) — the track stays as a visible, recoverable record
- Migration for the new saga columns
Verified: Worker boots against RabbitMQ + Postgres in Docker; the new
endpoints (fault translator, failed consumer, mark-track-as-failed) configure
and the bus starts clean.
Build: 0 warnings, 0 errors.
34 lines
1.3 KiB
C#
34 lines
1.3 KiB
C#
namespace Musify.Infrastructure.MassTransit
|
|
{
|
|
internal static class RoutingSlipVariableNames
|
|
{
|
|
internal static class Workflow
|
|
{
|
|
internal const string TemporalDirectory = "Workflow.TemporalDirectory";
|
|
internal const string CorrelationId = "Workflow.CorrelationId";
|
|
internal const string TrackId = "Workflow.TrackId";
|
|
internal const string ProcessKind = "Workflow.ProcessKind";
|
|
}
|
|
|
|
internal static class ProcessKinds
|
|
{
|
|
internal const string TrackPicture = "TrackPicture";
|
|
internal const string TrackAudio = "TrackAudio";
|
|
}
|
|
|
|
internal static class Audio
|
|
{
|
|
internal const string SourceFilePath = "Audio.SourceFilePath";
|
|
internal const string TranscodedDirectory = "Audio.TranscodedDirectory";
|
|
}
|
|
|
|
internal static class Picture
|
|
{
|
|
internal const string OriginalFilePath = "Picture.OriginalFilePath";
|
|
internal const string SmallResizedFilePath = "Picture.SmallResizedFilePath";
|
|
internal const string MediumResizedFilePath = "Picture.MediumResizedFilePath";
|
|
internal const string LargeResizedFilePath = "Picture.LargeResizedFilePath";
|
|
}
|
|
}
|
|
}
|