Docs on Emitter/Receiver/Confim Under the Hood

15 views
Skip to first unread message

Vaughn Vernon

unread,
Jul 29, 2013, 2:56:32 PM7/29/13
to events...@googlegroups.com
Hi All,

I have read the README.md about these, but I am not seeing the complete picture. I'd like to to know step-by-step how this works.

When an Emitter sends a command or an event, is it persisted to the log at that point so that the Emitter may resend if necessary?

When a Receiver receives a command or an event, is it persisted to a log (perhaps again) before delivery to the receiver's mailbox?

When a Confim confirms true/false, is the confirmation completed at the Emitter or Receiver, or where?

Best,

Vaughn

Martin Krasser

unread,
Jul 30, 2013, 4:27:16 AM7/30/13
to events...@googlegroups.com
Hi Vaughn,

- journaling (logging) functionality is added to an actor only via the Eventsourced trait. All other traits do not interact with the journal.
- a Receiver is a convenience trait that unwraps a Message so that an actor's receive method can pattern match against the received event/command directly. It's usage is optional.
- an Emitter is a convenience trait that lets actor send an event/command via a channel without explicitly wrapping it into a Message. It's usage is optional.
- a Receiver and/or Emitter trait can be used in combintation with but also inpdependently of the Eventsourced trait.
- for at-least-once delivery of messages, channels can be used. A reliable channel preserves message ordering, a default channel does not.
- the Confirm trait can also be used independently of Receiver and/or Emitter. It is used by channel destinations so that they do not need to explicitly call a Message's confirm() method. The effect of calling confirm() depends on the type of channel that sent the message. For a default channel, confirmation writes an "acknowledgement" to the journal, for a reliable channel, the message (stored by the channel) is removed again from the journal (but leaves the "acknowledgement" that has been written together with the outbound message).

Reading only the stackable traits section may not be enough for getting the complete picture. I recommend reading at least sections

- Overview
- Terminology
- First steps
- Channels
- Recovery

additionally. Hope that helps.

Cheers,
Martin
--
You received this message because you are subscribed to the Google Groups "Eventsourced User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eventsourced...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
Martin Krasser

blog:    http://krasserm.blogspot.com
code:    http://github.com/krasserm
twitter: http://twitter.com/mrt1nz
Reply all
Reply to author
Forward
0 new messages