haf / Documently

Domain Driven Design with CQRS, Event Sourcing, MassTransit, RavenDB, RabbitMQ and C# and F#.
http://architecture.jayway.com
218 stars 55 forks source link

Consumer stops processing events #16

Closed wayne-o closed 12 years ago

wayne-o commented 12 years ago

Hey

My readmodel stops consuming events of a certain type after the 1st one has gone through.

It looks like a similar issue to http://stackoverflow.com/questions/3284731/rabbitmq-message-consumers-stop-consuming-messages

do you have any idea why it would just stop consuming? always after the 1st one has been successfully processed.

wayne-o commented 12 years ago

I have enabled ALL log level and i am now seeing this:

CommonDomain.Persistence.ConflictingCommandException: Exception of type 'EventStore.ConcurrencyException' was thrown. ---> EventStore.ConcurrencyException: Exception of type 'EventStore.ConcurrencyException' was thrown.
   at EventStore.Persistence.RavenPersistence.RavenPersistenceEngine.Commit(Commit attempt) in c:\Code\public\EventStore\src\proj\EventStore.Persistence.RavenPersistence\RavenPersistenceEngine.cs:line 135
   at EventStore.OptimisticEventStore.Commit(Commit attempt) in c:\Code\public\EventStore\src\proj\EventStore.Core\OptimisticEventStore.cs:line 98
   at EventStore.OptimisticEventStream.PersistChanges(Guid commitId) in c:\Code\public\EventStore\src\proj\EventStore.Core\OptimisticEventStream.cs:line 150
   at EventStore.OptimisticEventStream.CommitChanges(Guid commitId) in c:\Code\public\EventStore\src\proj\EventStore.Core\OptimisticEventStream.cs:line 131
   at CommonDomain.Persistence.EventStore.EventStoreRepository.Save(IAggregate aggregate, Guid commitId, Action`1 updateHeaders) in c:\Code\public\CommonDomain\src\proj\CommonDomain.Persistence.EventStore\EventStoreRepository.cs:line 105
   --- End of inner exception stack trace ---
   at CommonDomain.Persistence.EventStore.EventStoreRepository.Save(IAggregate aggregate, Guid commitId, Action`1 updateHeaders) in c:\Code\public\CommonDomain\src\proj\CommonDomain.Persistence.EventStore\EventStoreRepository.cs:line 117
   at Sonatribe.Domain.CommandHandlers.MusicEvent.CreateNewMusicEventCommandHandler.Consume(CreateNewMusicEvent command) in C:\Users\Wayne Douglas\ProjectSonatribe\Domain\CommandHandlers\MusicEvent\CreateNewMusicEventCommandHandler.cs:line 65
   at MassTransit.Pipeline.Sinks.ConsumerMessageSink`2.<>c__DisplayClass1.<Selector>b__0(IConsumeContext`1 context) in d:\BuildAgent-02\work\8d1373c869590c5b\src\MassTransit\Pipeline\Sinks\ConsumerMessageSink.cs:line 55
   at MassTransit.Pipeline.Sinks.InboundConvertMessageSink`1.<>c__DisplayClass2.<>c__DisplayClass4.<Enumerate>b__1(IConsumeContext x) in d:\BuildAgent-02\work\8d1373c869590c5b\src\MassTransit\Pipeline\Sinks\InboundConvertMessageSink.cs:line 45
   at MassTransit.Context.ServiceBusReceiveContext.DeliverMessageToConsumers(IReceiveContext context) in d:\BuildAgent-02\work\8d1373c869590c5b\src\MassTransit\Context\ServiceBusReceiveContext.cs:line 113
wayne-o commented 12 years ago

OK

I've gotten rid of that error but it\'s still stopping after he 1st event is processed?

haf commented 12 years ago

Could you post a more detailed log? Post the full debug log, please.

wayne-o commented 12 years ago

Could I share the code with you?

wayne-o commented 12 years ago

here is the log from the App.exe which is issuing the commands: http://monobin.com/1400/

here is the log from the domian service: http://monobin.com/1401/

haf commented 12 years ago

Yeah, share the code.

From those logs, I can't see the problem; you are publishing the events OK...

wayne-o commented 12 years ago

Added you as a colab :)

thanks man

haf commented 12 years ago

OK, cool. I'll have a look after work.

haf commented 12 years ago

PS: that's in 3 hours.

wayne-o commented 12 years ago

cool!

it should just run up out of the box

how can I get my email to you without it being plastered on github?

haf commented 12 years ago

You can add me to skype h.feldt

haf commented 12 years ago

I think we can safely close this now. :)