org.eligosource.eventsourced.core
channel id. Must be a positive integer.
journal of the org.eligosource.eventsourced.core.EventsourcingExtension at which this channel is registered.
delivery destination of event messages added to this channel.
redelivery policy.
optional dispatcher name.
delivery destination of event messages added to this channel.
delivery destination of event messages added to this channel.
channel id.
channel id. Must be a positive integer.
journal of the org.eligosource.eventsourced.core.EventsourcingExtension at which this channel is registered.
De-registers this channel from org.eligosource.eventsourced.core.EventsourcingExtension.
De-registers this channel from org.eligosource.eventsourced.core.EventsourcingExtension.
A persistent channel that sends event org.eligosource.eventsourced.core.Messages to
destination
. Every event message sent to this channel is stored in the journal together with an acknowledgement (which is used during replay to decide if the channel should ignore a message or not).If
destination
positively confirms the receipt of an event message withMessage.confirm()
the stored message is deleted from the journal. Ifdestination
negatively confirms the receipt of an event message withMessage.confirm(false)
or no confirmation is made (i.e. a timeout occurs), a re-delivery attempt is made after a certain redelivery delay (specified bypolicy.redeliveryDelay
).If the maximum number of re-delivery attempts have been made (specified by
policy.redeliveryMax
), the channel restarts itself after a certain restart delay (specified bypolicy.restartDelay
) and starts again with re-deliveries. If the maximum number of restarts has been reached (specified bypolicy.restartMax
) the channel stops message delivery and publishes a org.eligosource.eventsourced.core.DeliveryStopped event to the event stream of the akka.actor.ActorSystem this channel belongs to. Applications can then re-activate the channel by callingEventsourcingExtension.deliver(Int)
with the channel id as argument.A
ReliableChannel
storessender
references along with event messages so that they can be forwarded to destinations even after the channel has been restarted. If a stored sender reference is a remote reference, it remains valid even after recovery from a JVM crash (i.e. a crash of the JVM the channel is running in) provided the remote sender is still available.Usually, a
ReliableChannel
is used in combination with anEventsourced
processor, as described in the documentation of org.eligosource.eventsourced.core.Channel. AReliableChannel
can also be used independently of anEventsourced
processor (i.e. standalone). For standalone channel usage, senders must set theMessage.processorId
of the sentMessage
to0
(which is the default value):This is equivalent to directly sending the
Message.event
:channel ! "my event"
A
ReliableChannel
internally wraps a received event into aMessage
withprocessorId
set to0
. Setting theprocessorId
to0
causes a reliable channel to skip writing an acknowledgement. An acknowledgement always refers to an event message received by anEventsourced
processor, so there's no need to write one in this case.org.eligosource.eventsourced.core.JournalProtocol.WriteAck
org.eligosource.eventsourced.core.JournalProtocol.WriteOutMsg
org.eligosource.eventsourced.core.RedeliveryPolicy
org.eligosource.eventsourced.core.Channel