New Transparent capture is in preview. Record every app's traffic with no proxy configuration, on Windows, macOS and Linux. Learn more

protobufResponseFilter Filter

Select exchanges whose response body is protobuf, detected from the Content-Type header returned by the upstream server.

protobufResponseFilter is the precise selector for outbound protobuf traffic in a Fluxzy rule. It complements protobufRequestFilter for the upload side and the broader protobufFilter when you need both directions in a single match.

When to use this filter

Use protobufResponseFilter when you want a rule that fires only because the server is returning protobuf, regardless of what the client uploaded. It is the right filter for actions that mutate or observe the download side of an API.

Typical situations:

  • Tagging every protobuf response with a consistent label for later analysis.
  • Throttling protobuf downloads to simulate a slow network on the server side.
  • Capturing only the responses you care about decoding with a known schema.

The filter evaluates on the responseHeaderReceivedFromRemote scope, so it runs as soon as the response headers are parsed. If you also care about request bodies, use protobufFilter, or protobufRequestFilter for the opposite direction only.

Real world examples

Tag every protobuf response

Apply a tag to every exchange where the server returns protobuf so you can pivot the timeline by outbound encoding.

rules:
- filter:
    typeKind: ProtobufResponseFilter
  actions:
  - typeKind: ApplyTagAction
    tag:
      value: protobuf-download

Throttle the bandwidth of protobuf downloads

Slow down the response side for any protobuf payload to reproduce a customer report about gRPC streaming under poor network conditions.

rules:
- filter:
    typeKind: ProtobufResponseFilter
  actions:
  - typeKind: AverageThrottleAction
    bandwidthBytesPerSeconds: 32768

Capture only protobuf responses

Send any exchange that returns a protobuf body to a dedicated capture so the binary stream can be replayed later against the appropriate .proto file.

rules:
- filter:
    typeKind: ProtobufResponseFilter
  actions:
  - typeKind: CaptureSessionAction

Reference

protobufResponseFilter

Description

Select exchanges having protobuf response body. The content-type header is checked to determine if the content body is protobuf.

Evaluation scope

Evaluation scope defines the timing where this filter will be applied.

responseHeaderReceivedFromRemote This scope occurs the moment fluxzy has done parsing the response header.

YAML configuration name

protobufResponseFilter

Settings

This filter has no specific characteristic

The following table describes the customizable properties available for this filter:

Property Type Description DefaultValue
inverted boolean Negate the filter result false

Example of usage

The following examples apply a comment to the filtered exchange

Select only exchanges with protobuf response body.

rules:
- filter:
    typeKind: ProtobufResponseFilter
  actions:
  - typeKind: ApplyCommentAction
    comment: filter was applied

Select exchanges without protobuf response body.

rules:
- filter:
    typeKind: ProtobufResponseFilter
  actions:
  - typeKind: ApplyCommentAction
    comment: filter was applied

.NET reference

View definition of ProtobufResponseFilter for .NET integration.

See also

This filter has no related filter

Frequently asked questions

How is protobufResponseFilter different from protobufFilter?

protobufResponseFilter only inspects the response Content-Type, while protobufFilter matches when either side is protobuf. Use the response filter when you only want to act on what the server returns.

Does it match gRPC server streaming?

Yes. gRPC uses application/grpc, which is a protobuf media type, so server streaming responses are matched too.

When does the filter fire in the pipeline?

It evaluates on the responseHeaderReceivedFromRemote scope, as soon as the response header is parsed. The body itself can still be modified by downstream actions.

Can I select only non protobuf responses?

Yes, set inverted: true. The filter then matches any exchange whose response Content-Type is not protobuf.

Learn more about Fluxzy rules