Hi,

We are following eventsourcing, DDD/CQRS approach. Single writer at the 
write side for persisting state. 
*Note*: Single writers are sharded by ID.

We are using Akka-Work-Pull pattern of Typesafe in our application for 
processing.

Jars included for akka persistence are akka-contrib_2.10-2.3.4.jar and 
akka-persistence-experimental_2.10-2.3.4.jar.

Layers in the application are Front End, Master Work Allocator, Workers for 
processing. 

Front End, Master, Worker are deployed on different nodes. The actor system 
of front end and  master is "*ClusterSystem*". The actor system of worker 
is "*WorkerSystem*". 

Request form Browser is coming to Front end . Request flow,
Browser -> FrontEnd -> Master -> Worker

Worker's pull the work from master and on successful processing persists 
state via sharded single writers.
*Note: Cluster Sharding is created with actor system *"*WorkerSystem*". 
Worker actors and Cluster Sharding have same*actor system *"*WorkerSystem*".

Below is the sharding code in PersistentActor.
 
val idExtractor: ShardRegion.IdExtractor = {
    case created: LedgerCreated =>{
      println("%%%%%%%%% IdExtractor : " +created.ledgerId.id.toString)
      (created.ledgerId.id.toString, created)
    }
    case edited: LedgerEdited   => (edited.ledgerId.id.toString, edited)
    case deleted: LedgerDeleted => (deleted.ledgerId.id.toString, deleted)
  }

  val shardResolver: ShardRegion.ShardResolver = msg => msg match {
    case created: LedgerCreated =>{
       println("%%%%%%%%% ShardResolver : " +created.ledgerId.id 
<http://created.ledgerid.id/> % shards)
      (created.ledgerId.id <http://created.ledgerid.id/> % shards).toString
    }
    case edited: LedgerEdited   => (edited.ledgerId.id 
<http://edited.ledgerid.id/> % shards).toString
    case deleted: LedgerDeleted => (deleted.ledgerId.id 
<http://deleted.ledgerid.id/> % shards).toString
  }

Messages are not reaching sharded PersistentActor neither reaching dead 
letter queue. 

*But strange is we are getting the log written in the "shardResolver". But 
the log written in the "IdExtractor" is not displayed. Which means shard is 
getting resolved but there is an issue while locating persistent actor 
entry.*

We are not able to figure out why message sent to shard is reaching the 
"shardResolver" 
block but doesn't reach "idExtractor" block.

Kindly let us know what we are missing.

-Prakhyat M M

-- 
>>>>>>>>>>      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.

Reply via email to