Pingerchips LogoPingerchips
Pingerflows

Filter Node

The filter node conditionally passes or drops a message based on a query against the message context.

When to Use

  • Block messages that don't meet certain criteria
  • Only broadcast events where specific data fields match a condition
  • Combine with transform to filter-then-enrich pipelines

Configuration

FieldTypeRequiredDescription
filterobjectYesMongoDB-style query object

Filter Scope

Filters can match against two namespaces:

PrefixTargets
data.Fields in the message payload
metadata.appId, channel, event

Omitting a prefix matches directly against the top-level object.

Query Operators

OperatorMeaning
$eqEqual
$neNot equal
$gtGreater than
$gteGreater than or equal
$ltLess than
$lteLess than or equal
$inValue is in array
$ninValue is not in array
$andAll conditions must match
$orAt least one condition must match
$norNone of the conditions match
$notInverts a condition

Examples

Filter by payload field

Pass only messages where data.active is true:

{
  "filter": {
    "data.active": true
  }
}

Filter by event name (metadata)

Pass only message events:

{
  "filter": {
    "metadata.event": "message"
  }
}

Combined AND filter

Pass only messages where data.priority >= 5 and the event is alert:

{
  "filter": {
    "$and": [
      { "data.priority": { "$gte": 5 } },
      { "metadata.event": "alert" }
    ]
  }
}

Allow only specific users

{
  "filter": {
    "data.userId": { "$in": ["user-1", "user-2", "user-3"] }
  }
}

Behaviour on Mismatch

When the filter condition is not met the pipeline stops. No further nodes run and no broadcast is emitted. The client receives an error reply.

Limitations

  • Aggregation queries ($group, $sum, etc.) are not supported.
  • Joins across multiple documents are not supported.
  • Regex matching ($regex) is not supported.

Next Steps

On this page