Hi
I’ve currently been involved in a project that uses PersistentFSM that connects to a local akka.persistence.journal.leveldb but they cant save large value only write and read character d and c and why cannot write f character
var actorSystem = ActorSystem("ActorSystem")
def repeatChar(char:Char, n: Int) : String = {
var result = ""
for(_ <- 1 to n){
result += "" + char
}
result
}
var actor = actorSystem.actorOf(Props[OutBoundFsm], "PropExample")
val rs0 = MailBox(List(repeatChar('c',100000)), "other",None)
actor ! SendToMailBox(rs0)
val rs1 = Items(List(repeatChar('d',200000)), "other",None)
actor ! SendToItems(rs1)
val rs2 = Items(List(repeatChar('f',300000)), "other",None)
actor ! SendToItems(rs2)
actor ! GetCurrentItem
this is my config file :
persistence {
journal {
plugin = "akka.persistence.journal.leveldb",
leveldb {
dir = "target/items/journal",
native = false,
fsync = on
}
},
snapshot-store {
plugin = "akka.persistence.snapshot-store.local",
local {
dir = "target/items/snapshots"
}
}
}
actor {
serializers {
java = "akka.serialization.JavaSerializer"
# Define kryo serializer
kryo = "com.romix.akka.serialization.kryo.KryoSerializer"
},
kryo {
type = "graph"
idstrategy = "incremental"
buffer-size = 8192
max-buffer-size = -1
use-manifests = false
use-unsafe = false
post-serialization-transformations = "lz4,aes"
implicit-registration-logging = false
kryo-trace = false
resolve-subclasses = false
mappings {
#"package1.name1.className1" = 20,
#"package2.name2.className2" = 21
}
classes = [
"framework.Items.DomainEvent"
]
}
}
why cannot write this line (below)
val rs2 = Items(List(repeatChar('f',300000)), "other",None)
actor ! SendToItems(rs2)`**
and built.sbt
` "org.iq80.leveldb" % "leveldb" % "0.7",
"org.fusesource.leveldbjni" % "leveldbjni-all" % "1.8",`
what is the problem in my source ?`