ediverse Explore the platform

Spotlight PEPPOL BIS Billing 3.0 The EU e-invoicing mandate is here — France Sept 2026, Belgium Jan 2026, Germany 2025.

Message Filter

The selective filter — not to be confused with router (which always dispatches).

Problem

A team subscribes to a general channel (all invoices) but only cares about invoices above €10,000. How to avoid uselessly processing small invoices?

Forces

  • Republishing a filtered channel costs broker throughput (read + write).
  • Asking the producer to split adds upstream complexity.
  • Filtering at the consumer is local but consumes subscriber CPU.
  • Criteria evolve — €10,000 today, €5,000 tomorrow.

Solution

Insert a Message Filter between the source channel and the target channel (or directly inside the consumer). The filter inspects the payload (typically via an expression — JSONPath, XPath, Camel expression) and republishes only matching messages. Simple implementation, semantics known to all.

EDI implementation

In EDI, typical examples: filter INVOIC > €10k for accounting, filter ORDERS with regulated products (alcohol, pharma) for compliance, filter negative MDNs to partner support. Implementation: Camel route `.filter()`, Kafka Streams `.filter()`, Lambda filter function. Reuse the schema registry for typed parsing.

Anti-patterns

  • Filter that modifies the message — that is no longer a filter, that is a translator.
  • Cascade filters without drop-rate monitoring — silent and impossible to debug.
  • Filter too costly (full XML parse) overloading the consumer.

Sources