org.eligosource.eventsourced.core

Message

case class Message(event: Any, sequenceNr: Long = 0L, timestamp: Long = 0L, processorId: Int = 0, acks: Seq[Int] = immutable.this.Nil, ack: Boolean = true, senderRef: ActorRef = null, confirmationTarget: ActorRef = null, confirmationPrototype: Confirmation = null) extends Product with Serializable

A message for communicating application events. Application events are not interpreted by the eventsourced library and can have any type. Since the library doesn't make any assumptions about the structure and semantics of event, applications may also choose to send commands with org.eligosource.eventsourced.core.Messages. In other words, the library can be used for both, event-sourcing and command-sourcing.

Messages sent to an org.eligosource.eventsourced.core.Eventsourced processor are called input messages. Processors process input messages and optionally emit (or send) output messages to one or more destinations, usually via org.eligosource.eventsourced.core.Channels. Output messages should be derived from input messages using the copy(...) method. Processors may also reply to initial senders using the actor's current sender reference.

event

Application event (or command).

sequenceNr

Sequence number that is generated when messages are written to the journal. Can also be used for detecting duplicates, in special cases.

timestamp

time the input message was added to the event log.

processorId

Id of the event processor that stored (and emitted) this message.

ack

Whether or not an acknowledgement should be written to the journal during (or after) delivery of this message by a org.eligosource.eventsourced.core.Channel. Used by event processors to indicate a series of output messages (that are derived from a single input message). In this case, output messages 1 to n-1 should have ack set to false and only output message n should have ack set to true (default). If an acknowledgement has been written for a series, all messages of that series will be ignored by the corresponding channel during a replay, otherwise all of them will be delivered again.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Message
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Message(event: Any, sequenceNr: Long = 0L, timestamp: Long = 0L, processorId: Int = 0, acks: Seq[Int] = immutable.this.Nil, ack: Boolean = true, senderRef: ActorRef = null, confirmationTarget: ActorRef = null, confirmationPrototype: Confirmation = null)

    event

    Application event (or command).

    sequenceNr

    Sequence number that is generated when messages are written to the journal. Can also be used for detecting duplicates, in special cases.

    timestamp

    time the input message was added to the event log.

    processorId

    Id of the event processor that stored (and emitted) this message.

    ack

    Whether or not an acknowledgement should be written to the journal during (or after) delivery of this message by a org.eligosource.eventsourced.core.Channel. Used by event processors to indicate a series of output messages (that are derived from a single input message). In this case, output messages 1 to n-1 should have ack set to false and only output message n should have ack set to true (default). If an acknowledgement has been written for a series, all messages of that series will be ignored by the corresponding channel during a replay, otherwise all of them will be delivered again.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val ack: Boolean

    Whether or not an acknowledgement should be written to the journal during (or after) delivery of this message by a org.eligosource.eventsourced.core.Channel.

    Whether or not an acknowledgement should be written to the journal during (or after) delivery of this message by a org.eligosource.eventsourced.core.Channel. Used by event processors to indicate a series of output messages (that are derived from a single input message). In this case, output messages 1 to n-1 should have ack set to false and only output message n should have ack set to true (default). If an acknowledgement has been written for a series, all messages of that series will be ignored by the corresponding channel during a replay, otherwise all of them will be delivered again.

  7. val acks: Seq[Int]

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def confirm(pos: Boolean = true): Unit

    Should be called by org.eligosource.eventsourced.core.Channel destinations to (positively or negatively) confirm the receipt of this event message.

    Should be called by org.eligosource.eventsourced.core.Channel destinations to (positively or negatively) confirm the receipt of this event message. Destinations may also delegate this call other actors or threads.

    pos

    true for a positive receipt confirmation, false for a negative one.

  11. val confirmationPrototype: Confirmation

  12. val confirmationTarget: ActorRef

  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. val event: Any

    Application event (or command).

  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. val processorId: Int

    Id of the event processor that stored (and emitted) this message.

  22. val senderRef: ActorRef

  23. val sequenceNr: Long

    Sequence number that is generated when messages are written to the journal.

    Sequence number that is generated when messages are written to the journal. Can also be used for detecting duplicates, in special cases.

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. val timestamp: Long

    time the input message was added to the event log.

  26. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def withAck(ack: Boolean): Message

    Returns a copy of this message with an updated ack value.

  30. def withEvent(event: Any): Message

    Returns a copy of this message with an updated event value.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped