// Module included in the following assemblies:
//
// * /serverless/event_workflows/serverless-using-brokers.adoc

[id="kn-trigger-filtering_{context}"]
= Filtering events using triggers

In the following trigger example, only events with the attribute `type: dev.knative.samples.helloworld` will reach the event sink.

[source,terminal]
----
$ kn trigger create <trigger_name> --broker <broker_name> --filter type=dev.knative.samples.helloworld --sink ksvc:<service_name>
----

You can also filter events using multiple attributes. The following example shows how to filter events using the type, source, and extension attributes.

[source,terminal]
----
$ kn trigger create <trigger_name> --broker <broker_name> --sink ksvc:<service_name> \
--filter type=dev.knative.samples.helloworld \
--filter source=dev.knative.samples/helloworldsource \
--filter myextension=my-extension-value
----
