Package akka.javasdk

Interface OriginAwareContext

All Superinterfaces:
Context
All Known Subinterfaces:
MessageContext, UpdateContext

public interface OriginAwareContext extends Context
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    default boolean
    Returns true if this message originated in the same region where it is currently being processed.
    When available, this method returns the region where a message was first created.

    Methods inherited from interface akka.javasdk.Context Link icon

    selfRegion
  • Method Details Link icon

    • originRegion Link icon

      Optional<String> originRegion()
      When available, this method returns the region where a message was first created.
      Returns:
      the region where a message was first created. When not applicable, it returns an empty Optional.
    • hasLocalOrigin Link icon

      default boolean hasLocalOrigin()
      Returns true if this message originated in the same region where it is currently being processed. A message is considered to have originated in a region if it was created in that region. In all other regions, the same message is treated as a replication.

      For messages coming from Akka entities:

      Returns:
      true if the message originated in the current processing region, false otherwise