I was able to resolve this by doing the following in my PersistentView:
case class UpdateView( id: String)
...
ShardRegion.idExtractor {
...
case m:UpdateView => (m.id, Update(await = true ))
}
ShardRegion.ShardResolver {
...
case m:UpdateView => s"{m.id.hashCode() % 100}"
}
Then in my PersistentActor I changed the tell to:
viewRegion ! UpdateView(m.orderId)
I still don't believe I should need to do that but this is working for me.
Thanks,
Bill
On Monday, August 17, 2015 at 6:18:38 PM UTC-5, Bill Goldsworthy wrote:
>
> Greetings,
>
> I am working on an PersistentActor/PersistentView (for Akka 2.3.12) - when
> I go to signal my view via Update:
>
> persist(UpdatedLineItemsEvt(m.orderId, lineItems)) { evt ⇒
> val updatedState = applyEvent(evt, state)
> viewRegion ! Update(await = true)
> sender() ! UpdateOrderAck(updatedState.id)
> context.become(collectingReceive(updatedState))
> }
>
> I receive that 'Update' is an unhandled message:
>
> [OrderProcessor] --> Applied Domain Event:
> OrderUpdatedLineItemsEvt(c98edfed-efd0-488e-9bbe-f28f3fccdbf0)
> [akka://TestCluster/user/sharding/order-view] unhandled message from
> Actor[akka://TestCluster/user/sharding/order-processor/c98edfed-efd0-488e-9bbe-f28f3fccdbf0#436724062]:
>
> Update(true,9223372036854775807)
>
> Any insight as to why this might happen? The view otherwise behaves
> normally, I just can't signal it. I don't believe that I should have to
> register akka.persistence.Update in the views IdExtractor and ShardResolver
> (is that incorrect?)
>
> Thank you,
> Bill Goldsworthy
>
--
>>>>>>>>>> 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.