Akka actor response caching -



Akka actor response caching -

i'm using akka on 1 of projects , need state of actor, way i'm doing follows.

a rest request comes in

@get @produces(array(mediatype.application_json)) def get() = { seek { await.result((getscanningactor ? workinfo), 5.second).asinstanceof[scanrequest] } catch{ case ex: timeoutexception => { requesttimedout() } } }

on actor respond current work state

case workinfo => sender ! currentwork

for reason first time phone call function right value, on next requests same value received on first call

i'm using dcevm if makes difference.

akka

Comments