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 TypeMethodDescriptionasJSon()The full event message as aMapsuitable for JSon serialization, containing all fields of this event.@Nullable StringThe URI of the endpoint the exchange was being sent to (producer endpoint) when the event was captured.@Nullable StringThe exception details as JSon (type, message, and stack trace), ornullif no exception is present.The unique exchange identifier.@Nullable StringThe id of the route where the exchange originally started (the consumer route), ornullif not available.@Nullable StringSource 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.longTimestamp when the event was captured (milliseconds since epoch).@Nullable StringThe id of the EIP processor node where the event occurred, ornullif not available.longgetUid()Unique monotonically increasing identifier for this event message.booleanWhether 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"), ornullif 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 fromgetFromRouteId()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), ornullif 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 benullwhen the failure occurs before any send attempt (e.g. a directthrowExceptionin 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, ornullif 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), ornullif no exception is present. -
toJSon
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
-