Class EventEnvelope<E extends Event,Meta,Context>

java.lang.Object
fr.maif.eventsourcing.EventEnvelope<E,Meta,Context>
Type Parameters:
E -
Meta -
Context -

public class EventEnvelope<E extends Event,Meta,Context> extends Object
The EventEnvelope is a wrapper for event containing metadatas
  • Field Details

    • id

      public final UUID id
      The unique id of the event
    • sequenceNum

      public final Long sequenceNum
      The order num of the event
    • eventType

      public final String eventType
      The type of the event
    • emissionDate

      public final LocalDateTime emissionDate
      The date when the event is produced
    • transactionId

      public final String transactionId
      The id of the transaction if there is more than one event published in the transaction
    • metadata

      public final Meta metadata
      Metadatas can be stored allog the event
    • event

      public final E extends Event event
      The event
    • context

      public final Context context
      a Context can be stored allog the event
    • version

      public final Long version
      The version of the event used to deserialize the event and handle multi versions
    • published

      public final Boolean published
      Is the event published to kafka
    • totalMessageInTransaction

      public final Integer totalMessageInTransaction
      Number of messages in the transaction for this entity
    • numMessageInTransaction

      public final Integer numMessageInTransaction
      Number of the current messages in the transaction for this entity
    • entityId

      public final String entityId
      The id of the entity
    • userId

      public final String userId
      The id of the user that produces this event
    • systemId

      public final String systemId
      The id of the system that produces this event
  • Constructor Details

  • Method Details