Package io.mats3.api.intercept
Interface MatsOutgoingMessage.MatsSentOutgoingMessage
- All Superinterfaces:
MatsOutgoingMessage
- All Known Implementing Classes:
JmsMatsMessage
- Enclosing interface:
- MatsOutgoingMessage
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.mats3.api.intercept.MatsOutgoingMessage
MatsOutgoingMessage.DispatchType, MatsOutgoingMessage.MatsEditableOutgoingMessage, MatsOutgoingMessage.MatsSentOutgoingMessage, MatsOutgoingMessage.MessageType
-
Method Summary
Modifier and TypeMethodDescriptionint
long
long
long
int
int
long
default int
Methods inherited from interface io.mats3.api.intercept.MatsOutgoingMessage
getBytes, getBytesKeys, getData, getDispatchType, getFlowId, getFrom, getInitialTargetState, getInitiatingAppName, getInitiatingAppVersion, getInitiatorId, getMatsMessageId, getMessageType, getReplyTo, getSameStackHeightState, getString, getStringKeys, getTimeToLive, getTo, getTraceId, getTraceProperty, getTracePropertyKeys, isInteractive, isNoAudit, isNonPersistent, isReplyToSubscription, isToSubscription
-
Method Details
-
getSystemMessageId
String getSystemMessageId() -
getEnvelopeProduceNanos
long getEnvelopeProduceNanos()- Returns:
- time taken (in nanoseconds) to create the Mats envelope, including serialization of all relevant
constituents: DTO, STO and any Trace Properties. Note that this will be a slice of the user lambda
timing (
getUserLambdaNanos()
for both init and stage), as it is done at the time of e.g. invokingprocessContext.request()
inside the user lambda.
-
getEnvelopeSerializationNanos
long getEnvelopeSerializationNanos()- Returns:
- time taken (in nanoseconds) to serialize the Mats envelope.
-
getEnvelopeSerializedSize
int getEnvelopeSerializedSize()- Returns:
- size (in bytes) of the serialized envelope - before compression. Do read the JavaDoc of
getEnvelopeWireSize()
too, as the same applies here: This size only refers to the Mats envelope, not the messaging system's final message size.
-
getEnvelopeCompressionNanos
long getEnvelopeCompressionNanos()- Returns:
- time taken (in nanoseconds) to compress the envelope - will be
0
if no compression was applied, while it will return > 0 if compression was applied.
-
getEnvelopeWireSize
int getEnvelopeWireSize()- Returns:
- size (in bytes) of the envelope after compression, which will be put inside the messaging system's
message envelope. If compression was not applied, returns the same value as
getEnvelopeSerializedSize()
. Note that the returned size is only the (compressed) Mats envelope, and does not include the size of the messaging system's message/envelope and any meta-data that Mats adds to this. This means that the message size on the wire will be larger.
-
getMessageSystemProduceAndSendNanos
long getMessageSystemProduceAndSendNanos()- Returns:
- time taken (in nanoseconds) to produce, and then send (transfer) the message to the message broker.
-
getMessageSystemTotalWireSize
default int getMessageSystemTotalWireSize()- Returns:
- the number of bytes sent on the wire (best approximation), as far as Mats knows. Any overhead from the message system is unknown. Includes the envelope (which includes the TraceProperties), as well as the sideloads (bytes and strings). Implementation might add some more size for metadata. Notice that the strings are just "length()'ed", so any "exotic" characters are still just counted as 1 byte.
-
getDataSerializedSize
int getDataSerializedSize()- Returns:
- the number of units (bytes or characters) that the outgoing data (DTO) serialized to.
-