c# - Setting initial state of new saga -


we in process of migrating legacy system nservicebus 5.0. best way migrate our business data saga data? example, if had ordercancellationpolicy saga, allowed cancellation within 2 days, how past orders legacy system create these new sagas in correct state?

i see 2 options. first being write sql script prepopulate saga persistence tables (we using nhibernate persistence). other being create kind of special import message, such migrateorderdatacmd, contains data legacy order. import script send out these messages sagas handle , set saga data way.

any guidance in area appreciated.

theoretically i'd go option two, or version of it. imagine saga being down day , messages piling in queue. messages day coming in, you'd want verify when message sent, or add custom datetime message yourself.

when saga picks message, knows should not set timeout 2 days in future, rather time message took delivered saga. way when migrate current state, messages proper timeout set.

on other hand, if you've got large set of running processes, might want investigate how propagate tables. have no hands on experience adding records tables myself, changing them. :)


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -