Module processor

Source
Expand description

§PlainMessage Processor Implementations for TAP Node

This module provides message processing functionality for TAP Node. PlainMessage processors serve as middleware in the message handling pipeline, allowing for validation, transformation, and filtering of messages as they flow through the system.

§PlainMessage Processing Pipeline

The TAP Node uses a pipeline architecture for message processing, where messages pass through a series of processors in sequence. Each processor can:

  • Pass the message through unchanged
  • Transform the message in some way
  • Filter out (drop) messages based on certain criteria
  • Perform side effects (logging, metrics collection, etc.)

§Processor Types

The module provides several built-in processor implementations:

  • LoggingPlainMessageProcessor: Logs information about messages passing through the system
  • ValidationPlainMessageProcessor: Validates message structure and content
  • DefaultPlainMessageProcessor: A simple pass-through processor with minimal functionality
  • CompositePlainMessageProcessor: Combines multiple processors into a processing chain

§Custom Processors

You can create custom processors by implementing the PlainMessageProcessor trait. This allows for specialized processing such as:

  • PlainMessage transformation for protocol version compatibility
  • Content-based filtering and routing
  • Security scanning and anomaly detection
  • Metrics collection and performance monitoring

§Processing Modes

Each processor implements two key methods:

  • process_incoming(): For messages received by the node
  • process_outgoing(): For messages being sent from the node

This separation allows for different processing logic depending on message direction.

Structs§

DefaultPlainMessageProcessor
Default message processor with core functionality
DefaultPlainMessageProcessorImpl
Default message processor that logs and validates messages
LoggingPlainMessageProcessor
A message processor that logs messages
StateMachineIntegrationProcessor
State machine integration processor
ValidationPlainMessageProcessor
A message processor that validates messages

Traits§

PlainMessageProcessor
Trait for processing DIDComm messages in TAP nodes