I have a saga.  Once it completes the saga consumer disappears and
future messages get an error "Got Message X, but had no consumers for
it".  What do I do to leave the consumer / subscription active and
just start a new saga?  Here is my class:

    public class OutcomeImportSagaLuceneIndexer :
ISaga<OutcomeImportState>,
 
InitiatedBy<OutcomeImportStartedEvent>,
 
Orchestrates<OutcomeImportedEvent>
    {
        private readonly ILuceneRepository<OutcomeListModel>
repository;

        public
OutcomeImportSagaLuceneIndexer(ILuceneRepository<OutcomeListModel>
repository)
        {
            this.repository = repository;
            State = new OutcomeImportState();
        }

        public void Consume(OutcomeImportStartedEvent message)
        {
            State.OutcomesToImport = message.OutcomesToImport;
        }

        public void Consume(OutcomeImportedEvent message)
        {
            repository.Upsert(MapToLuceneListRecord(message.Outcome));
            State.OutcomesImported++;
            if (State.OutcomesImported < State.OutcomesToImport)
return;

            repository.RebuildIndex();
            IsCompleted = true;
        }

        private static OutcomeListModel
MapToLuceneListRecord(OutcomeViewModel model)
        {
            return Mapper.Map<OutcomeViewModel,
OutcomeListModel>(model);
        }

        public Guid Id { get; set; }
        public bool IsCompleted { get; set; }
        public OutcomeImportState State { get; set; }
    }

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to