Interface BacklogEventMessage

All Known Subinterfaces:
BacklogErrorEventMessage, BacklogTracerEventMessage

public interface BacklogEventMessage
Base interface for backlog event messages that capture exchange snapshots at a point in time, without retaining references to the live Exchange.

This is the shared contract between BacklogTracerEventMessage and BacklogErrorEventMessage.

Since:
4.21
  • Method Summary

    Modifier and Type
    Method
    Description
    The full event message as a Map suitable for JSon serialization, containing all fields of this event.
    @Nullable String
    The URI of the endpoint the exchange was being sent to (producer endpoint) when the event was captured.
    @Nullable String
    The exception details as JSon (type, message, and stack trace), or null if no exception is present.
    The unique exchange identifier.
    @Nullable String
    The id of the route where the exchange originally started (the consumer route), or null if not available.
    @Nullable String
    Source file location of the node where the event occurred (e.g.
    A detached snapshot of the exchange message content as JSon, including the message body, headers, and optionally exchange properties and variables.
    The name of the thread that was processing the exchange when this event was captured.
    The id of the route where the event occurred.
    long
    Timestamp when the event was captured (milliseconds since epoch).
    @Nullable String
    The id of the EIP processor node where the event occurred, or null if not available.
    long
    Unique monotonically increasing identifier for this event message.
    boolean
    Whether this event has an associated exception.
    toJSon(int indent)
    Dumps the full event message as a pretty-printed JSon string.
  • Method Details

    • getUid

      long getUid()
      Unique monotonically increasing identifier for this event message.
    • getTimestamp

      long getTimestamp()
      Timestamp when the event was captured (milliseconds since epoch).
    • getLocation

      @Nullable String getLocation()
      Source file location of the node where the event occurred (e.g. "MyRoute.java:42"), or null if source location tracking is not enabled.
    • getRouteId

      String getRouteId()
      The id of the route where the event occurred. For errors this is the route where the failure happened, which may differ from getFromRouteId() if the exchange was routed across multiple routes.
    • getFromRouteId

      @Nullable String getFromRouteId()
      The id of the route where the exchange originally started (the consumer route), or null if not available.
    • getExchangeId

      String getExchangeId()
      The unique exchange identifier.
    • getEndpointUri

      @Nullable String getEndpointUri()
      The URI of the endpoint the exchange was being sent to (producer endpoint) when the event was captured. This can be null when the failure occurs before any send attempt (e.g. a direct throwException in the route). This does not refer to the route's consumer (from) endpoint.
    • getToNode

      @Nullable String getToNode()
      The id of the EIP processor node where the event occurred, or null if not available.
    • getProcessingThreadName

      String getProcessingThreadName()
      The name of the thread that was processing the exchange when this event was captured.
    • getMessageAsJSon

      String getMessageAsJSon()
      A detached snapshot of the exchange message content as JSon, including the message body, headers, and optionally exchange properties and variables.
    • hasException

      boolean hasException()
      Whether this event has an associated exception.
    • getExceptionAsJSon

      @Nullable String getExceptionAsJSon()
      The exception details as JSon (type, message, and stack trace), or null if no exception is present.
    • toJSon

      String toJSon(int indent)
      Dumps the full event message as a pretty-printed JSon string.
      Parameters:
      indent - number of spaces to indent
      Returns:
      JSon representation of this event
    • asJSon

      Map<String,Object> asJSon()
      The full event message as a Map suitable for JSon serialization, containing all fields of this event.