Programmable Push Filters
You can use Redpanda Console’s programmable push filters to search for a specific record within a Kafka topic.
every individual Kafka record. The code has to return a boolean. If your code returns
true, the backend sends the record to the frontend.
Otherwise the record is skipped and Redpanda Console continues to consume records until the selected number
of max search results has been reached or "the end" of the topic hit.
On a topic’s Messages page, select to enable Filter and click +.
Redpanda Console can inject the following properties into your function, which you can use in your filter code:
partitionId- The record’s partition ID
offset- The record’s offset within its partition
key- The record’s key in its decoded form
value- The record’s value in its decoded form
headers- The record’s header value in its decoded form
Suppose you have a series of Avro, JSON, or Protobuf encoded record values that deserialize to JSON objects like this:
return value.item.id == "895e443a-f1b7-4fe5-ad66-b9adfe5420b9"
When the filter function returns
true, the record is sent to the front end. If you use more than one filter function at the same time, filters are combined with a logical
AND, so records must pass every filter. The offset specified also is effectively combined using an
You can use Redpanda Console’s filter engine against topics with millions of records, as the filter code is evaluated in the backend where more resources are available. However, while the filter engine is fairly efficient, it could potentially consume all available CPU resources and cause significant network traffic due to the number of consumed Kafka records.