Patrik, I forgot to mention that the actorPath of my channel destination is actually the path of a cluster-aware router who knows where exactly the remote target processor is. Maybe that's the cause?
On Wednesday, March 19, 2014 9:54:19 PM UTC+8, Patrik Nordwall wrote: > > Hi Daniel, > > That looks strange. I tried to reproduce it, but couldn't. Please provide > a minimized sample/test that we can run. > > Regards, > Patrik > > > On Wed, Mar 19, 2014 at 8:30 AM, Daniel Wang <[email protected]<javascript:> > > wrote: > >> hi, in my test system I have 2 processors, A, and B. In the logs below >> reflects this message flow: >> >> *Send persistent message DoDepositCash to A* >> *Send persistent message DoSubmitOrder to A,* >> *A receives DoSubmitOrder message and yields OrderCashLocked to a channel >> X and delivers to B* >> *B receives OrderCashLocked message and yields OrderSubmitted to a >> channel Y and delivers back to A.* >> >> Below are logs printed when the system is initially up: >> >> Processor A @seq=1 >> >> PersistentImpl(DoDepositCash(1878387908787379106,Btc,10000),1,mysys_ap,false,Collections(),Actor[akka.tcp:// >> [email protected]:46804/temp/$e]) >> Processor A @seq=2 >> >> PersistentImpl(DoSubmitOrder(MarketSide(Btc,Rmb),Order(1878387908787379106,1395212275401,2000,Some(500.0),None,None)),2,mysys_ap,false,Collections(),Actor[akka.tcp:// >> [email protected]:46804/temp/$j]) >> >> Processor B->A @seq=1 >> >> ConfirmablePersistentImpl(OrderCashLocked(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,None)),1,mysys_mp_btc_rmb,false,0,Collections(),DeliveredByPersistentChannel(X,2,1,Actor[akka://mysys/user/X/$a#1241560331]),Actor[akka://mysys/system/deletion-batch-layer#940984408],Actor[akka.tcp:// >> [email protected]:46804/temp/$j]) >> Processor A->B @seq=3 >> >> ConfirmablePersistentImpl(OrderSubmitted(OrderInfo(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,Some(1395212230304)),0,0,Pending,None),List()),3,mysys_ap,false,0,Collections(),DeliveredByPersistentChannel(Y,1,1,Actor[akka://mysys/user/Y/$a#1653209817]),Actor[akka://mysys/system/deletion-batch-layer#940984408],Actor[akka://mysys/user/market_processor_btc_rmb/singleton#1752194582]) >> >> Then I got those during the first replay (no snapshoting): >> >> Processor A @seq=1 >> >> PersistentImpl(DoDepositCash(1878387908787379106,Btc,10000),1,mysys_ap,false,List(),Actor[akka.tcp:// >> [email protected]:46804/temp/$e]) >> Processor A @seq=2 >> >> PersistentImpl(DoSubmitOrder(MarketSide(Btc,Rmb),Order(1878387908787379106,1395212275401,2000,Some(500.0),None,None)),2,mysys_ap,false,List(X),Actor[akka.tcp:// >> [email protected]:46804/temp/$j]) >> >> Processor B->A @seq=1 >> >> ConfirmablePersistentImpl(OrderCashLocked(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,None)),1,mysys_mp_btc_rmb,false,0,List(Y),null,null,Actor[akka.tcp:// >> [email protected]:46804/temp/$j]) >> Processor A->B @seq=3 >> >> ConfirmablePersistentImpl(OrderSubmitted(OrderInfo(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,Some(1395212230304)),0,0,Pending,None),List()),3,mysys_ap,false,0,List(),null,null,Actor[akka.tcp:// >> [email protected]:50354/user/market_processor_btc_rmb/singleton#1752194582 >> ]) >> >> Processor B->A @seq=2 >> >> ConfirmablePersistentImpl(OrderCashLocked(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,None)),2,mysys_mp_btc_rmb,false,0,Collections(),DeliveredByPersistentChannel(X,2,1,Actor[akka://mysys/user/X/$a#669702344]),Actor[akka://mysys/system/deletion-batch-layer#1382334128],Actor[akka.tcp:// >> [email protected]:46804/temp/$j]) >> Processor A->B @seq=4 >> >> ConfirmablePersistentImpl(OrderSubmitted(OrderInfo(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,Some(1395212250415)),0,0,Pending,None),List()),4,mysys_ap,false,0,Collections(),DeliveredByPersistentChannel(Y,2,1,Actor[akka://mysys/user/Y/$a#-117955869]),Actor[akka://mysys/system/deletion-batch-layer#1382334128],Actor[akka://mysys/user/market_processor_btc_rmb/singleton#288803418]) >> >> >> And these during 2nd reply: >> Processor A @seq=1 >> >> PersistentImpl(DoDepositCash(1878387908787379106,Btc,10000),1,mysys_ap,false,List(),Actor[akka.tcp:// >> [email protected]:46804/temp/$e]) >> Processor A @seq=2 >> >> PersistentImpl(DoSubmitOrder(MarketSide(Btc,Rmb),Order(1878387908787379106,1395212275401,2000,Some(500.0),None,None)),2,mysys_ap,false,List(X),Actor[akka.tcp:// >> [email protected]:46804/temp/$j]) >> >> Processor B->A @seq=1 >> >> ConfirmablePersistentImpl(OrderCashLocked(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,None)),1,mysys_mp_btc_rmb,false,0,List(Y),null,null,Actor[akka.tcp:// >> [email protected]:46804/temp/$j]) >> Processor A->B @seq=3 >> >> ConfirmablePersistentImpl(OrderSubmitted(OrderInfo(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,Some(1395212230304)),0,0,Pending,None),List()),3,mysys_ap,false,0,List(),null,null,Actor[akka.tcp:// >> [email protected]:50354/user/market_processor_btc_rmb/singleton#1752194582 >> ]) >> >> Processor B->A @seq=2 >> >> ConfirmablePersistentImpl(OrderCashLocked(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,None)),2,mysys_mp_btc_rmb,false,0,List(Y),null,null,Actor[akka.tcp:// >> [email protected]:46804/temp/$j]) >> Processor A->B @seq=4 >> >> ConfirmablePersistentImpl(OrderSubmitted(OrderInfo(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,Some(1395212250415)),0,0,Pending,None),List()),4,mysys_ap,false,0,List(),null,null,Actor[akka.tcp:// >> [email protected]:50364/user/market_processor_btc_rmb/singleton#288803418 >> ]) >> >> Processor B->A @seq=3 >> >> ConfirmablePersistentImpl(OrderCashLocked(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,None)),3,mysys_mp_btc_rmb,false,0,Collections(),DeliveredByPersistentChannel(X,2,1,Actor[akka://mysys/user/X/$a#1805531495]),Actor[akka://mysys/system/deletion-batch-layer#138777156],Actor[akka.tcp:// >> [email protected]:46804/temp/$j]) >> Processor A->B @seq=5 >> >> ConfirmablePersistentImpl(OrderSubmitted(OrderInfo(MarketSide(Btc,Rmb),Order(1878387908787379106,1,2000,Some(500.0),None,Some(1395212250415)),0,0,Pending,None),List()),5,mysys_ap,false,0,Collections(),DeliveredByPersistentChannel(Y,2,1,Actor[akka://mysys/user/Y/$a#-1683723611]),Actor[akka://mysys/system/deletion-batch-layer#138777156],Actor[akka.tcp:// >> [email protected]:50364/user/market_processor_btc_rmb/singleton#288803418 >> ]) >> >> >> It seems the processors tied to deliver the same messages to channels but >> channels assigned different sequence numbers to the messages so each reply >> we got additional 2 ConfirmableConsistent messages. I tried different >> journal plugin the results are the same. *Is this a potential bug, or >> something I did wrong?* >> >> FYI, here is how I send the message in code in Processor A: >> >> case p @ Persistent(DoSubmitOrder(side: MarketSide, order @ >> Order(userId, _, quantity, _, _, _)), seq) => >> println("--------::::" + seq + " " + p) >> .... >> channelToMarketProcessors ! /* forward */ >> Deliver(p.withPayload(OrderCashLocked(side, o)), getProcessorRef(side)) >> .... >> } >> >> case p @ ConfirmablePersistent(OrderSubmitted(originOrderInfo, txs), >> seq, _) => >> >> p.confirm() >> >> >> and in Processor B: >> >> case p @ ConfirmablePersistent(OrderCashLocked(side, order: Order), seq, >> _) => >> >> val orderSubmitted = ... >> >> channelToAccountProcessor ! Deliver(p.withPayload(orderSubmitted), >> accountProcessorPath) >> >> p.confirm() >> >> -- >> >>>>>>>>>> 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] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> 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.
