Hi Daniel,
On 12.03.14 15:41, Daniel Wang wrote:
Akka persistence module provides at-lease-once message delivery, which
means a message may be delivered multiple times. Care must be taken in
the application logic to avoid processing the same message more than
once. One obvious (to me) way to deal with this is to keep a
last-processed-seq-nr in a processor (say A) or view.
tracking the last processed sequence number only works with a View.
Channel destinations cannot make any ordering assumtpions, hence,
tracking the last processed sequence number doesn't work. For example, a
message delivered to a remote destination can be lost and is redelivered
later i.e. the destination will see that redelivered message out of order.
But a processor may receive ConfirmablePersistent messages from more
than one Channel (say X, Y, Z), so A will have to keep 3
'last-processed-seq-nr' variable to keep track events from X, Y, Z
respectively. However, I found ConfirmablePersistent interface doesn't
expose it channel id, so I don't know how to update these 3 vars?
At the moment, a sender needs to include an application-specific source
id in the message so that a destination can distinguish different
senders. Since ConfirmablePersistent messages can only be received via
channels, it makes sense to add public channelId field in the future.
Did I miss something?
If the above logic is correct, will Akka Persistence module do the
last-processed-id tracking automatically in the future so we have
exactly-once message delivery?
Exactly-once delivery is very expensive and limits scalability. If you
haven't already done, you may want to read Pet Helland's paper Life
beyond Distributed Transactions
<http://www-db.cs.wisc.edu/cidr/cidr2007/papers/cidr07p15.pdf> for some
motivations behind supporting at-least-once delivery semantics only.
--
>>>>>>>>>> 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
<mailto:akka-user+unsubscr...@googlegroups.com>.
To post to this group, send email to akka-user@googlegroups.com
<mailto:akka-user@googlegroups.com>.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
--
Martin Krasser
blog: http://krasserm.blogspot.com
code: http://github.com/krasserm
twitter: http://twitter.com/mrt1nz
--
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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.