Processors
A processor is a unit of logic that transforms, filters, or otherwise processes messages as they flow through your pipeline:
pipeline:
processors:
- mapping: |
root.message = this.content.uppercase()
root.meta.processed_at = now()
- filter:
check: 'this.type == "important"'
Processors can be configured at the input, pipeline, or output level. They are applied in the order they are defined.
Processor Pipelines
Processors can be nested to create complex transformation logic:
pipeline:
processors:
- branch:
processors:
- cache:
resource: user_cache
operator: get
key: ${! json("user_id") }
result_map: 'root.user = this'
- mapping: |
root.enriched = this.merge(this.user)
Error Handling
Processors can fail during execution. Use the catch processor to handle errors gracefully:
pipeline:
processors:
- try:
- mapping: 'root = this.parse_json()'
- catch:
- log:
message: "Failed to parse: ${! content() }"
Browse Processors
Showing 80 of 185 components
archive
Processor
Archives all the messages of a batch into a single message according to the selected archive format.
awk
Processor
Executes an AWK program on messages. This processor is very powerful as it offers a range of custom functions for querying and mutating message conten...
aws_bedrock_chat
Processor
Generates responses to messages in a chat conversation, using the AWS Bedrock API.
aws_bedrock_embeddings
Processor
Computes vector embeddings on text, using the AWS Bedrock API.
aws_dynamodb_partiql
Processor
Executes a PartiQL expression against a DynamoDB table for each message.
aws_lambda
Processor
Invokes an AWS lambda for each message. The contents of the message is the payload of the request, and the result of the invocation will become the ne...
azure_cosmosdb
Processor
Creates or updates messages as JSON documents in [Azure CosmosDB](https://learn.microsoft.com/en-us/azure/cosmos-db/introduction).
benchmark
Processor
Logs basic throughput statistics of messages that pass through this processor.
bloblang
Processor
Executes a [Bloblang](/guides/bloblang) mapping on messages.
bounds_check
Processor
Removes messages (and batches) that do not fit within certain size boundaries.
branch
Processor
The `branch` processor allows you to create a new request message via a [Bloblang mapping](/guides/bloblang), execute a list of processors on the requ...
cache
Processor
Performs operations against a [cache resource](/components/caches/) for each message, allowing you to store or retrieve data within message payloads.
cached
Processor
Cache the result of applying one or more processors to messages identified by a key. If the key already exists within the cache the contents of the me...
catch
Processor
Applies a list of child processors _only_ when a previous processing step has failed.
command
Processor
Executes a command for each message.
compress
Processor
Compresses messages according to the selected algorithm. Supported compression algorithms are: [flate gzip lz4 pgzip snappy zlib]
crash
Processor
Crashes the process using a fatal log message. The log message can be set using function interpolations described in [Bloblang queries](/guides/pipeli...
deadband
Processor
Forwards a numeric reading only when it has changed meaningfully since the last forwarded value.
decompress
Processor
Decompresses messages according to the selected algorithm. Supported decompression algorithms are: [bzip2 flate gzip lz4 pgzip snappy zlib]
dedupe
Processor
Deduplicates messages by storing a key value in a cache using the `add` operator. If the key already exists within the cache it is dropped.
for_each
Processor
A processor that applies a list of child processors to messages of a batch as though they were each a batch of one message.
gcp_bigquery_select
Processor
Executes a `SELECT` query against BigQuery and replaces messages with the rows returned.
gcp_vertex_ai_chat
Processor
Generates responses to messages in a chat conversation, using the Vertex AI API.
gcp_vertex_ai_embeddings
Processor
Generates vector embeddings to represent input text, using the Vertex AI API.
grok
Processor
Parses messages into a structured format by attempting to apply a list of Grok expressions, the first expression to result in at least one value repla...
group_by
Processor
Splits a [batch of messages](/guides/pipelines/batching) into N batches, where each resulting batch contains a group of messages determined by a [Blob...
group_by_value
Processor
Splits a batch of messages into N batches, where each resulting batch contains a group of messages determined by a [function interpolated string](/gui...
http
Processor
Performs an HTTP request using a message batch as the request body, and replaces the original message parts with the body of the response.
insert_part
Processor
Insert a new message into a batch at an index. If the specified index is greater than the length of the existing batch it will be appended to the end.
jmespath
Processor
Executes a [JMESPath query](http://jmespath.org/) on JSON documents and replaces the message with the resulting document.
jq
Processor
Transforms and filters messages using jq queries.
json_schema
Processor
Checks messages against a provided JSONSchema definition but does not change the payload under any circumstances. If a message does not match the sche...
log
Processor
Prints a log event for each message. Messages always remain unchanged. The log message can be set using function interpolations described in [Bloblang...
mapping
Processor
Executes a [Bloblang](/guides/bloblang) mapping on messages, creating a new document that replaces (or filters) the original message.
metadata
Processor
Attaches Expanso runtime metadata to messages.
metric
Processor
Emit custom metrics by extracting values from messages.
msgpack
Processor
Converts messages to or from the [MessagePack](https://msgpack.org/) format.
mutation
Processor
Executes a [Bloblang](/guides/bloblang) mapping and directly transforms the contents of messages, mutating (or deleting) them.
nats_kv
Processor
Perform operations on a NATS key-value bucket.
nats_request_reply
Processor
Sends a message to a NATS subject and expects a reply, from a NATS subscriber acting as a responder, back.
noop
Processor
Noop is a processor that does nothing, the message passes through unchanged. Why? Sometimes doing nothing is the braver option.
ollama_chat
Processor
Generates responses to messages in a chat conversation, using the Ollama API.
ollama_embeddings
Processor
Generates vector embeddings from text, using the Ollama API.
ollama_moderation
Processor
Generates responses to messages in a chat conversation, using the Ollama API.
openai_chat_completion
Processor
Generates responses to messages in a chat conversation, using the OpenAI API.
openai_embeddings
Processor
Generates vector embeddings to represent input text, using the OpenAI API.
openai_image_generation
Processor
Generates an image from a text description and other attributes, using OpenAI API.
openai_speech
Processor
Generates audio from a text description and other attributes, using OpenAI API.
openai_transcription
Processor
Generates a transcription of spoken audio in the input language, using the OpenAI API.
openai_translation
Processor
Translates spoken audio into English, using the OpenAI API.
parallel
Processor
A processor that applies a list of child processors to messages of a batch as though they were each a batch of one message (similar to the [`for_each`...
parquet
Processor
Converts batches of documents to or from [Parquet files](https://parquet.apache.org/docs/).
parquet_decode
Processor
Decodes [Parquet files](https://parquet.apache.org/docs/) into a batch of structured messages.
parquet_encode
Processor
Encodes [Parquet files](https://parquet.apache.org/docs/) from a batch of structured messages.
parse_log
Processor
Parses common log formats into structured data. This is easier and often much faster than [`grok`](/components/processors/grok).
processors
Processor
A processor grouping several sub-processors.
protobuf
Processor
Performs conversions to or from a protobuf message. This processor uses reflection, meaning conversions can be made directly from the target .proto fi...
qdrant
Processor
Query items within a [Qdrant](https://qdrant.tech/) collection.
rate_limit
Processor
Throttles the throughput of a pipeline according to a specified [`rate_limit`](/components/rate_limits/) resource. Rate limits are shared across compo...
redis
Processor
Performs actions against Redis that aren't possible using a [`cache`](/components/processors/cache) processor. Actions are performed for each message ...
redis_script
Processor
Performs actions against Redis using [LUA scripts](https://redis.io/docs/manual/programmability/eval-intro/).
resource
Processor
Resource is a processor type that runs a processor resource identified by its label.
retry
Processor
Attempts to execute a series of child processors until success.
select_parts
Processor
Cherry pick a set of messages from a batch by their index. Indexes larger than the number of messages are simply ignored.
signature
Processor
Signs each message's payload with the edge node's Ed25519 identity keypair.
sleep
Processor
Sleep for a period of time specified as a duration string for each message. This processor will interpolate functions within the `duration` field, you...
split
Processor
Breaks message batches (synonymous with multiple part messages) into smaller batches. The size of the resulting batches are determined either by a dis...
sql
Processor
Runs an arbitrary SQL query against a database and (optionally) returns the result as an array of objects, one for each row returned.
sql_insert
Processor
Inserts rows into an SQL database for each message, and leaves the message unchanged.
sql_raw
Processor
Runs an arbitrary SQL query against a database and (optionally) returns the result as an array of objects, one for each row returned.
sql_select
Processor
Runs an SQL select query against a database and returns the result as an array of objects, one for each row returned, containing a key for each column...
subprocess
Processor
Executes a command as a subprocess and, for each message, will pipe its contents to the stdin stream of the process followed by a newline.
switch
Processor
Conditionally processes messages based on their contents.
sync_response
Processor
Adds the payload in its current state as a synchronous response to the input source, where it is dealt with according to that specific input type.
try
Processor
Executes a list of child processors on messages only if no prior processors have failed (or the errors have been cleared).
try_catch
Processor
Executes a list of child `processors` on each message and, if any of them fail, executes a separate list of `catch` processors to recover from or reac...
unarchive
Processor
Unarchives messages according to the selected archive format into multiple messages within a [batch](/guides/pipelines/batching).
while
Processor
A processor that checks a [Bloblang query](/guides/bloblang) against each batch of messages and executes child processors on them for as long as the q...
workflow
Processor
Executes a topology of [`branch` processors](/components/processors/branch), performing them in parallel where possible.
xml
Processor
Parses messages as an XML document, performs a mutation on the data, and then overwrites the previous contents with the new value.