Interface MessageNameResolver

All Superinterfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.controller.ControllerService

public interface MessageNameResolver extends org.apache.nifi.controller.ControllerService
An interface for resolving message names from schema definitions and input streams. This interface is typically used in scenarios where message types need to be determined dynamically from the content of the message and the associated schema definition.

Implementations of this interface can be used to extract or derive message names from various sources such as message headers, content, or schema metadata, enabling proper message processing and routing based on the resolved message type.

  • Method Summary

    Modifier and Type
    Method
    Description
    getMessageName(Map<String,String> variables, SchemaDefinition schemaDefinition, InputStream inputStream)
    Resolves and returns the message name based on the provided schema definition and input stream.

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.controller.ControllerService

    initialize, isStateful, migrateProperties
  • Method Details

    • getMessageName

      MessageName getMessageName(Map<String,String> variables, SchemaDefinition schemaDefinition, InputStream inputStream) throws IOException
      Resolves and returns the message name based on the provided schema definition and input stream.

      This method analyzes the given schema definition and input stream to determine the appropriate message name. The resolution strategy depends on the specific implementation and may involve parsing message headers, analyzing message content, or consulting schema metadata.

      Parameters:
      variables - additional variables that may influence the resolution process, such as context-specific information
      schemaDefinition - the schema definition containing schema information and metadata
      inputStream - the input stream containing the message data to analyze
      Returns:
      the resolved message name encapsulating the determined message type
      Throws:
      IOException - if an I/O error occurs while reading from the input stream or processing the schema