Skip to content

Conversation

@Ozoniuss
Copy link

@Ozoniuss Ozoniuss commented Jan 8, 2026

This example shows how to implement a payload converter that detects when a payload is larger than a certain threshold, in which case it writes it to a storage system of choice instead of the temporal server. In this particular example payloads are written to a local file but it can be adapted to work with any storage. Such a converter is useful when a workflow/activity regularly has payloads that risk exceeding Temporal's hard limit of 2MB.

What was changed

Added a new sample.

Why?

Two places where I worked required building something similar, so I thought it would be a good idea to write a sample for it. I haven't seen a similar sample available.

Checklist

  1. How was this tested:
    Locally with Temporal cluster as well as unit tests available.

  2. Any docs updates needed?
    No

This example shows how to implement a payload converter that detects
when a payload is larger than a certain threshold, in which case it
writes it to a storage system of choice instead of the temporal server.
In this particular example payloads are written to a local file but it
can be adapted to work with any storage. Such a converter is useful when
a workflow/activity regularly has payloads that risk exceeding
Temporal's hard limit of 2MB.
@Ozoniuss Ozoniuss requested a review from a team as a code owner January 8, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant