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.
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:
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.
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
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
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
Select exchanges having protobuf response body. The content-type header is checked to determine if the content body is protobuf.
Evaluation scope defines the timing where this filter will be applied.
responseHeaderReceivedFromRemote This scope occurs the moment fluxzy has done parsing the response header.
protobufResponseFilter
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 |
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
View definition of ProtobufResponseFilter for .NET integration.
This filter has no related filter
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.
Yes. gRPC uses application/grpc, which is a protobuf media type, so server streaming responses are matched too.
It evaluates on the responseHeaderReceivedFromRemote scope, as soon as the response header is parsed. The body itself can still be modified by downstream actions.
Yes, set inverted: true. The filter then matches any exchange whose response Content-Type is not protobuf.