Class ApplicationVersionCorrelationDataProvider

java.lang.Object
io.fluxzero.sdk.publishing.correlation.ApplicationVersionCorrelationDataProvider
All Implemented Interfaces:
CorrelationDataProvider

public final class ApplicationVersionCorrelationDataProvider extends Object implements CorrelationDataProvider
Adds the configured application version to another correlation data provider.
  • Method Details

    • decorate

      public static CorrelationDataProvider decorate(CorrelationDataProvider delegate, io.fluxzero.common.application.PropertySource propertySource)
      Decorates the given provider when fluxzero.application.version is configured. Returns the original provider unchanged when the property is absent or blank.
      Parameters:
      delegate - provider that supplies the existing correlation data
      propertySource - source that may contain the application version
      Returns:
      the decorated provider, or delegate when no version is configured
    • getCorrelationData

      public Map<String,String> getCorrelationData(@Nullable DeserializingMessage currentMessage)
      Description copied from interface: CorrelationDataProvider
      Returns correlation metadata derived from the current deserializing message.
      Specified by:
      getCorrelationData in interface CorrelationDataProvider
      Parameters:
      currentMessage - the message currently being handled (can be null)
      Returns:
      a map of correlation metadata entries
    • getCorrelationData

      public Map<String,String> getCorrelationData(@Nullable Client client, @Nullable io.fluxzero.common.api.SerializedMessage currentMessage, @Nullable io.fluxzero.common.MessageType messageType)
      Description copied from interface: CorrelationDataProvider
      Returns correlation metadata derived from a serialized message and optional context.

      This method may be invoked when publishing messages without a DeserializingMessage context, such as in asynchronous dispatch or system-level operations.

      Specified by:
      getCorrelationData in interface CorrelationDataProvider
      Parameters:
      client - the client instance performing the dispatch (can be null)
      currentMessage - the last serialized message in context (can be null)
      messageType - the type of the outgoing message (e.g. COMMAND, EVENT, etc.)
      Returns:
      a map of correlation metadata entries
    • getApplicationVersionKey

      public String getApplicationVersionKey()
      Description copied from interface: CorrelationDataProvider
      Retrieves the key used to identify the deployed application version in correlation metadata.
      Specified by:
      getApplicationVersionKey in interface CorrelationDataProvider
      Returns:
      a string representing the application version key
    • getApplicationIdKey

      public String getApplicationIdKey()
      Description copied from interface: CorrelationDataProvider
      Retrieves the key used to identify the application ID in correlation metadata.
      Specified by:
      getApplicationIdKey in interface CorrelationDataProvider
      Returns:
      a string representing the application ID key
    • getTaskIdKey

      public String getTaskIdKey()
      Description copied from interface: CorrelationDataProvider
      Retrieves the key used to identify the platform task in correlation metadata.
      Specified by:
      getTaskIdKey in interface CorrelationDataProvider
      Returns:
      a string representing the task ID key
    • getClientIdKey

      public String getClientIdKey()
      Description copied from interface: CorrelationDataProvider
      Retrieves the key representing the client identifier in the correlation metadata.
      Specified by:
      getClientIdKey in interface CorrelationDataProvider
      Returns:
      the key used to identify the client in correlation data
    • getClientNameKey

      public String getClientNameKey()
      Description copied from interface: CorrelationDataProvider
      Retrieves the key associated with the client's name from the correlation metadata.
      Specified by:
      getClientNameKey in interface CorrelationDataProvider
      Returns:
      a string representing the key for the client's name
    • getConsumerKey

      public String getConsumerKey()
      Description copied from interface: CorrelationDataProvider
      Retrieves the consumer key used to identify the consumer of a message.
      Specified by:
      getConsumerKey in interface CorrelationDataProvider
      Returns:
      a string representing the consumer key
    • getHandlerKey

      public String getHandlerKey()
      Description copied from interface: CorrelationDataProvider
      Retrieves the key associated with the current handler class in correlation metadata.
      Specified by:
      getHandlerKey in interface CorrelationDataProvider
      Returns:
      a string representing the handler key
    • getTrackerKey

      public String getTrackerKey()
      Description copied from interface: CorrelationDataProvider
      Retrieves the key representing the tracker component in correlation metadata.
      Specified by:
      getTrackerKey in interface CorrelationDataProvider
      Returns:
      the tracker key as a string
    • getCorrelationIdKey

      public String getCorrelationIdKey()
      Description copied from interface: CorrelationDataProvider
      Returns the key used for identifying the correlation ID within the metadata.
      Specified by:
      getCorrelationIdKey in interface CorrelationDataProvider
      Returns:
      a string representing the key for the correlation ID
    • getTraceIdKey

      public String getTraceIdKey()
      Description copied from interface: CorrelationDataProvider
      Returns the key used to identify the trace ID in correlation metadata.
      Specified by:
      getTraceIdKey in interface CorrelationDataProvider
      Returns:
      a string representing the trace ID key.
    • getTriggerKey

      public String getTriggerKey()
      Description copied from interface: CorrelationDataProvider
      Retrieves the trigger key used to identify the triggering context for correlation metadata.
      Specified by:
      getTriggerKey in interface CorrelationDataProvider
      Returns:
      the trigger key as a string
    • getTriggerTypeKey

      public String getTriggerTypeKey()
      Description copied from interface: CorrelationDataProvider
      Returns the key associated with the trigger type in the correlation data.
      Specified by:
      getTriggerTypeKey in interface CorrelationDataProvider
      Returns:
      a string representing the trigger type key
    • getTriggerNamespaceKey

      public String getTriggerNamespaceKey()
      Description copied from interface: CorrelationDataProvider
      Returns 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:
      getTriggerNamespaceKey in interface CorrelationDataProvider
    • getInvocationKey

      public String getInvocationKey()
      Description copied from interface: CorrelationDataProvider
      Retrieves the key associated with the invocation context within the correlation metadata.
      Specified by:
      getInvocationKey in interface CorrelationDataProvider
      Returns:
      the invocation key as a string
    • getDelayKey

      public String getDelayKey()
      Description copied from interface: CorrelationDataProvider
      Retrieves the key used to identify the delay metadata within correlation data.
      Specified by:
      getDelayKey in interface CorrelationDataProvider
      Returns:
      a string representing the delay metadata key