Thanks for narrowing it down. It is indeed something wrong when using a PersistentChannel from a Processor. We already have a ticket related to this: https://www.assembla.com/spaces/akka/tickets/3933 I have added some more info to that ticket, including further minimized reproducer.
It works fine if you use a Channel instead of PersistentChannel. It should of course be supported to use Processor with PersistentChannel, but it was not the primary combination we had in mind. May I ask why you use a PersistentChannel and not Channel? /Patrik On Thu, Mar 20, 2014 at 10:20 AM, Daniel Wang <[email protected]> wrote: > I think I may have found a bug: > > Please find my code in this gist https://gist.github.com/dong77/9659988 > If you delete line75, the replay will work, otherwise, each replay will > genera new events. > > Here is the failure senario: > There are two processors A and B. A handles persistent messages of type X > and Y, when handling X, A actually does nothing; but when handling Y, A > will yield a message Z through a persistent channel to processor B. B only > handles Z and simply confirms all messages received. > To make the replay fail, simply send A a persistent X event, then send A a > persistent Y event. Theoretically, after A and B processed all messages, > journal shall have 4 events: X, Y, Z and a channel confirmation for Z; but > what I saw are 5 events including the channel message that should be > deleted upon confirmation. > > I used mongodb as journal store, here are these events (also in the gist): > > -----IF i didn't send A an X: > > > db.messages.find() > { "_id" : ObjectId("532ab02be31876dceb18ec85"), "processorId" : "test_first", > "sequenceNr" : NumberLong(1), "marker" : "A", "message" : > BinData(0,"Cg0IARIJrO0ABXQAAmhpEAEaCnRlc3RfZmlyc3QgADAAQABaGWFra2E6Ly9jb2luZXgvZGVhZExldHRlcnM=") > } > { "_id" : ObjectId("532ab02be31876dceb18ec87"), "processorId" : "test_first", > "sequenceNr" : NumberLong(1), "marker" : > "C-/user/first/singleton/first_channel", "message" : BinData(0,"") } > { "_id" : ObjectId("532ab02be31876dceb18ec88"), "processorId" : > "test_second", "sequenceNr" : NumberLong(1), "marker" : "A", "message" : > BinData(0,"Cg0IARIJrO0ABXQAAkhJEAEaC3Rlc3Rfc2Vjb25kIAAwAEABWkVha2thLnRjcDovL2NvaW5leEAxOTIuMTY4LjAuMTAzOjI1NTUyL3VzZXIvZmlyc3Qvc2luZ2xldG9uIzE3NjU3NDY3NTA=") > } > > -----IF i did send A an X: > > db.messages.find() > { "_id" : ObjectId("532ab0d3e3182e6b37f5d05e"), "processorId" : "test_first", > "sequenceNr" : NumberLong(1), "marker" : "A", "message" : > BinData(0,"ClUIARJRrO0ABXNyABFqYXZhLmxhbmcuSW50ZWdlchLioKT3gYc4AgABSQAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAAMEAEaCnRlc3RfZmlyc3QgADAAQABaGWFra2E6Ly9jb2luZXgvZGVhZExldHRlcnM=") > } > { "_id" : ObjectId("532ab0d3e3182e6b37f5d05f"), "processorId" : "test_first", > "sequenceNr" : NumberLong(2), "marker" : "A", "message" : > BinData(0,"Cg0IARIJrO0ABXQAAmhpEAIaCnRlc3RfZmlyc3QgADAAQABaGWFra2E6Ly9jb2luZXgvZGVhZExldHRlcnM=") > } > { "_id" : ObjectId("532ab0d3e3182e6b37f5d060"), "processorId" : > "/user/first/singleton/first_channel", "sequenceNr" : NumberLong(1), "marker" > : "A", "message" : > BinData(0,"CoABCAcSYgo+Cg0IARIJrO0ABXQAAkhJEAIaCnRlc3RfZmlyc3QgADAAQABaGWFra2E6Ly9jb2luZXgvZGVhZExldHRlcnMSIGFra2E6Ly9jb2luZXgvdXNlci9zZWNvbmRfcm91dGVyGhhha2thLnBlcnNpc3RlbmNlLkRlbGl2ZXIQARojL3VzZXIvZmlyc3Qvc2luZ2xldG9uL2ZpcnN0X2NoYW5uZWwgADAAQABaRmFra2EudGNwOi8vY29pbmV4QDE5Mi4xNjguMC4xMDM6MjU1NTIvdXNlci9maXJzdC9zaW5nbGV0b24jLTIwMjAzNTcwODM=") > } > { "_id" : ObjectId("532ab0d3e3182e6b37f5d061"), "processorId" : "test_first", > "sequenceNr" : NumberLong(2), "marker" : > "C-/user/first/singleton/first_channel", "message" : BinData(0,"") } > { "_id" : ObjectId("532ab0d4e3182e6b37f5d062"), "processorId" : > "test_second", "sequenceNr" : NumberLong(1), "marker" : "A", "message" : > BinData(0,"Cg0IARIJrO0ABXQAAkhJEAEaC3Rlc3Rfc2Vjb25kIAAwAEABWkZha2thLnRjcDovL2NvaW5leEAxOTIuMTY4LjAuMTAzOjI1NTUyL3VzZXIvZmlyc3Qvc2luZ2xldG9uIy0yMDIwMzU3MDgz") > } > > > > > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
