Object

com.rbmhtechnology.eventuate.adapter.stream

DurableEventProcessor

Related Doc: package stream

Permalink

object DurableEventProcessor

Stream-based alternative to EventsourcedProcessor and StatefulProcessor.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DurableEventProcessor
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

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

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

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. def statefulProcessor[S, O](id: String, eventLog: ActorRef)(zero: S)(logic: (S, DurableEvent) ⇒ (S, Seq[O]))(implicit system: ActorSystem): Graph[FlowShape[DurableEvent, DurableEvent], NotUsed]

    Permalink

    Creates an Akka Streams stage that processes input DurableEvents with stateful logic, writes the processed events to eventLog and emits the written DurableEvents.

    Creates an Akka Streams stage that processes input DurableEvents with stateful logic, writes the processed events to eventLog and emits the written DurableEvents. The processor supports idempotent event processing by ignoring processed DurableEvents that have already been written in the past to eventLog which is determined by their vectorTimestamps. Behavior of the processor can be configured with:

    • eventuate.log.write-batch-size. Maximum size of DurableEvent batches written to the event log. Events are batched (with Flow.batch) if they are produced faster than this processor can process and write events.
    • eventuate.log.write-timeout. Timeout for writing events to the event log. A write timeout or another write failure causes this stage to fail.

    This processor should be used in combination with one or more DurableEventSources.

    id

    global unique writer id.

    eventLog

    target event log.

    zero

    initial processing state.

    logic

    stateful processing logic. The state part of the input is either zero for the first stream element or the updated state from the previous processing step for all other stream elements. The event part of the input is the the DurableEvent input of this processor. The event part of the result must be a sequence of zero or more DurableEvent payloads. Restricting the processing logic to only read DurableEvent metadata allows the processor to correctly update these metadata before processed events are written to the target event log. The processing logic can be used to drop, transform and split DurableEvents:

    • to drop an event, an empty sequence should be returned in the event part of the result
    • to transform an event, a sequence of length 1 should be returned in the event part of the result
    • to split an event, a sequence of length > 1 should be returned in the event part of the result
  16. def statelessProcessor[O](id: String, eventLog: ActorRef)(logic: (DurableEvent) ⇒ Seq[O])(implicit system: ActorSystem): Graph[FlowShape[DurableEvent, DurableEvent], NotUsed]

    Permalink

    Creates an Akka Streams stage that processes input DurableEvents with stateless logic, writes the processed events to eventLog and emits the written DurableEvents.

    Creates an Akka Streams stage that processes input DurableEvents with stateless logic, writes the processed events to eventLog and emits the written DurableEvents. The processor supports idempotent event processing by ignoring processed DurableEvents that have already been written in the past to eventLog which is determined by their vectorTimestamps. Behavior of the processor can be configured with:

    • eventuate.log.write-batch-size. Maximum size of DurableEvent batches written to the event log. Events are batched (with Flow.batch) if they are produced faster than this processor can process and write events.
    • eventuate.log.write-timeout. Timeout for writing events to the event log. A write timeout or another write failure causes this stage to fail.

    This processor should be used in combination with one or more DurableEventSources.

    id

    global unique writer id.

    eventLog

    target event log.

    logic

    stateless processing logic. Input is the DurableEvent input of this processor. The result must be a sequence of zero or more DurableEvent payloads. Restricting the processing logic to only read DurableEvent metadata allows the processor to correctly update these metadata before processed events are written to the target event log. The processing logic can be used to drop, transform and split DurableEvents:

    • to drop an event, an empty sequence should be returned
    • to transform an event, a sequence of length 1 should be returned
    • to split an event, a sequence of length > 1 should be returned
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped