Class TaskIdCorrelationDataProvider
java.lang.Object
io.fluxzero.sdk.publishing.correlation.TaskIdCorrelationDataProvider
- All Implemented Interfaces:
CorrelationDataProvider
Adds the platform task identity to another correlation data provider.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CorrelationDataProviderdecorate(CorrelationDataProvider delegate, PropertySource propertySource) Decorates the given provider whenFLUXZERO_TASK_IDis configured.Retrieves the key used to identify the application ID in correlation metadata.Retrieves the key used to identify the deployed application version in correlation metadata.Retrieves the key representing the client identifier in the correlation metadata.Retrieves the key associated with the client's name from the correlation metadata.Retrieves the consumer key used to identify the consumer of a message.getCorrelationData(DeserializingMessage currentMessage) Returns correlation metadata derived from the current deserializing message.getCorrelationData(Client client, SerializedMessage currentMessage, MessageType messageType) Returns correlation metadata derived from a serialized message and optional context.Returns the key used for identifying the correlation ID within the metadata.Retrieves the key used to identify the delay metadata within correlation data.Retrieves the key associated with the current handler class in correlation metadata.Retrieves the key associated with the invocation context within the correlation metadata.Retrieves the key used to identify the platform task in correlation metadata.Returns the key used to identify the trace ID in correlation metadata.Retrieves the key representing the tracker component in correlation metadata.Retrieves the trigger key used to identify the triggering context for correlation metadata.Returns the key containing the namespace in which the triggering message is stored.Returns the key associated with the trigger type in the correlation data.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CorrelationDataProvider
andThen, getCorrelationData
-
Method Details
-
decorate
public static CorrelationDataProvider decorate(CorrelationDataProvider delegate, PropertySource propertySource) Decorates the given provider whenFLUXZERO_TASK_IDis configured. Returns the original provider unchanged when the property and its legacy alias are absent or blank.- Parameters:
delegate- provider that supplies the existing correlation datapropertySource- source that may contain the platform task ID- Returns:
- the decorated provider, or
delegatewhen no task ID is configured
-
getCorrelationData
Description copied from interface:CorrelationDataProviderReturns correlation metadata derived from the current deserializing message.- Specified by:
getCorrelationDatain interfaceCorrelationDataProvider- Parameters:
currentMessage- the message currently being handled (can benull)- Returns:
- a map of correlation metadata entries
-
getCorrelationData
public Map<String,String> getCorrelationData(@Nullable Client client, @Nullable SerializedMessage currentMessage, @Nullable MessageType messageType) Description copied from interface:CorrelationDataProviderReturns correlation metadata derived from a serialized message and optional context.This method may be invoked when publishing messages without a
DeserializingMessagecontext, such as in asynchronous dispatch or system-level operations.- Specified by:
getCorrelationDatain interfaceCorrelationDataProvider- Parameters:
client- the client instance performing the dispatch (can benull)currentMessage- the last serialized message in context (can benull)messageType- the type of the outgoing message (e.g.COMMAND,EVENT, etc.)- Returns:
- a map of correlation metadata entries
-
getApplicationVersionKey
Description copied from interface:CorrelationDataProviderRetrieves the key used to identify the deployed application version in correlation metadata.- Specified by:
getApplicationVersionKeyin interfaceCorrelationDataProvider- Returns:
- a string representing the application version key
-
getApplicationIdKey
Description copied from interface:CorrelationDataProviderRetrieves the key used to identify the application ID in correlation metadata.- Specified by:
getApplicationIdKeyin interfaceCorrelationDataProvider- Returns:
- a string representing the application ID key
-
getTaskIdKey
Description copied from interface:CorrelationDataProviderRetrieves the key used to identify the platform task in correlation metadata.- Specified by:
getTaskIdKeyin interfaceCorrelationDataProvider- Returns:
- a string representing the task ID key
-
getClientIdKey
Description copied from interface:CorrelationDataProviderRetrieves the key representing the client identifier in the correlation metadata.- Specified by:
getClientIdKeyin interfaceCorrelationDataProvider- Returns:
- the key used to identify the client in correlation data
-
getClientNameKey
Description copied from interface:CorrelationDataProviderRetrieves the key associated with the client's name from the correlation metadata.- Specified by:
getClientNameKeyin interfaceCorrelationDataProvider- Returns:
- a string representing the key for the client's name
-
getConsumerKey
Description copied from interface:CorrelationDataProviderRetrieves the consumer key used to identify the consumer of a message.- Specified by:
getConsumerKeyin interfaceCorrelationDataProvider- Returns:
- a string representing the consumer key
-
getHandlerKey
Description copied from interface:CorrelationDataProviderRetrieves the key associated with the current handler class in correlation metadata.- Specified by:
getHandlerKeyin interfaceCorrelationDataProvider- Returns:
- a string representing the handler key
-
getTrackerKey
Description copied from interface:CorrelationDataProviderRetrieves the key representing the tracker component in correlation metadata.- Specified by:
getTrackerKeyin interfaceCorrelationDataProvider- Returns:
- the tracker key as a string
-
getCorrelationIdKey
Description copied from interface:CorrelationDataProviderReturns the key used for identifying the correlation ID within the metadata.- Specified by:
getCorrelationIdKeyin interfaceCorrelationDataProvider- Returns:
- a string representing the key for the correlation ID
-
getTraceIdKey
Description copied from interface:CorrelationDataProviderReturns the key used to identify the trace ID in correlation metadata.- Specified by:
getTraceIdKeyin interfaceCorrelationDataProvider- Returns:
- a string representing the trace ID key.
-
getTriggerKey
Description copied from interface:CorrelationDataProviderRetrieves the trigger key used to identify the triggering context for correlation metadata.- Specified by:
getTriggerKeyin interfaceCorrelationDataProvider- Returns:
- the trigger key as a string
-
getTriggerTypeKey
Description copied from interface:CorrelationDataProviderReturns the key associated with the trigger type in the correlation data.- Specified by:
getTriggerTypeKeyin interfaceCorrelationDataProvider- Returns:
- a string representing the trigger type key
-
getTriggerNamespaceKey
Description copied from interface:CorrelationDataProviderReturns the key containing the namespace in which the triggering message is stored.Messages produced before this correlation field was introduced may omit it; consumers should then use the application namespace.
- Specified by:
getTriggerNamespaceKeyin interfaceCorrelationDataProvider
-
getInvocationKey
Description copied from interface:CorrelationDataProviderRetrieves the key associated with the invocation context within the correlation metadata.- Specified by:
getInvocationKeyin interfaceCorrelationDataProvider- Returns:
- the invocation key as a string
-
getDelayKey
Description copied from interface:CorrelationDataProviderRetrieves the key used to identify the delay metadata within correlation data.- Specified by:
getDelayKeyin interfaceCorrelationDataProvider- Returns:
- a string representing the delay metadata key
-