Package akka.javasdk

Interface OriginAwareContext

All Superinterfaces:
Context
All Known Subinterfaces:
MessageContext, UpdateContext

public interface OriginAwareContext extends Context
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns true if this message originated in the current processing region, and for messages consumed from a topic or another service.
    When available, this method returns the region where a message was first created.

    Methods inherited from interface akka.javasdk.Context

    selfRegion
  • Method Details

    • originRegion

      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

      default boolean hasLocalOrigin()
      Returns true if this message originated in the current processing region, and for messages consumed from a topic or another service.

      The result depends on the message source:

      Returns:
      true if the message originated from a component in the current processing region, from a broker or from service-to-service eventing, false otherwise.