[akka-user] Re: Cluster: Loosing messages when rebalancing

2017-09-25 Thread Eduardo Fernandes
Absolutely clear.

Many thanks for your reply.

I'll check the persistence feature.

Best regards.

El lunes, 25 de septiembre de 2017, 15:02:40 (UTC+2), 
johannes...@lightbend.com escribió:
>
> Hi Eduardo,
>
> cluster sharding has at-most-once delivery (as most of Akka) so losing 
> some messages is to be expected. Persistent actor can opt-in to 
> at-least-once delivery (see 
> http://doc.akka.io/docs/akka/current/scala/persistence.html#at-least-once-delivery),
>  
> for other actors, you need to make sure to confirm and resend messages 
> manually.
>
> Johannes
>
> On Friday, September 22, 2017 at 6:02:48 PM UTC+2, Eduardo Fernandes wrote:
>>
>> Hi all.
>>
>> I'm using Akka 2.3.13 [I know... a bit old :(  ] with Java.
>>
>> A few times I'm loosing messages (in a very intensive concurrent 
>> environment).  In my case a message is sent to the actor just before the 
>> postStop() method is called, indicating that the kill action is sent to it 
>> due the rebalancing logic. 
>>
>> By documentation the PoisonPill is sent and the the ShardRegion actor 
>> (proxy) stop sending messages until the shard is completely rebalanced. 
>>  Following my traces the unique case I have where I loose a message is when 
>> I'm sending the message using the shard region actor which is physically in 
>> the same process where the destine actor is. I have an unique id in my 
>> messages the actor prints it on reception. Other commands sen't to the same 
>> actor from other nodes after rebalancing work fine. 
>>
>> I suppose the command would be queued and then sent automatically after 
>> rebalancing but I can't observe this.
>>
>> Have I to do something programmatically to make this work?
>>
>> Many thanks in advance for any help
>>
>> /Eduardo
>>
>

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Cluster: Loosing messages when rebalancing

2017-09-25 Thread johannes . rudolph
Hi Eduardo,

cluster sharding has at-most-once delivery (as most of Akka) so losing some 
messages is to be expected. Persistent actor can opt-in to at-least-once 
delivery (see 
http://doc.akka.io/docs/akka/current/scala/persistence.html#at-least-once-delivery),
 
for other actors, you need to make sure to confirm and resend messages 
manually.

Johannes

On Friday, September 22, 2017 at 6:02:48 PM UTC+2, Eduardo Fernandes wrote:
>
> Hi all.
>
> I'm using Akka 2.3.13 [I know... a bit old :(  ] with Java.
>
> A few times I'm loosing messages (in a very intensive concurrent 
> environment).  In my case a message is sent to the actor just before the 
> postStop() method is called, indicating that the kill action is sent to it 
> due the rebalancing logic. 
>
> By documentation the PoisonPill is sent and the the ShardRegion actor 
> (proxy) stop sending messages until the shard is completely rebalanced. 
>  Following my traces the unique case I have where I loose a message is when 
> I'm sending the message using the shard region actor which is physically in 
> the same process where the destine actor is. I have an unique id in my 
> messages the actor prints it on reception. Other commands sen't to the same 
> actor from other nodes after rebalancing work fine. 
>
> I suppose the command would be queued and then sent automatically after 
> rebalancing but I can't observe this.
>
> Have I to do something programmatically to make this work?
>
> Many thanks in advance for any help
>
> /Eduardo
>

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.