Skip to content

feat: offload large payload serialization to worker thread#733

Open
ikalachy wants to merge 2 commits into
mainfrom
feat/offload-large-payload-serialization
Open

feat: offload large payload serialization to worker thread#733
ikalachy wants to merge 2 commits into
mainfrom
feat/offload-large-payload-serialization

Conversation

@ikalachy

@ikalachy ikalachy commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

When a DataVerticle replies with a JsonArray or JsonObject over the clustered event bus, the Jackson serialization in encodeToWire can block the event loop for large payloads. This change offloads all JSON reply serialization to a worker thread via executeBlocking.

A configurable threshold (eventBusLargePayloadThreshold) controls when a warning is logged about large payloads. It defaults to the jsonMaxStringSize value if set, aligning both inbound parsing limits and outbound payload monitoring to the same configured size.

When a DataVerticle replies with a JsonArray or JsonObject over the
clustered event bus, the Jackson serialization in encodeToWire can
block the event loop for large payloads. This change offloads all
JSON reply serialization to a worker thread via executeBlocking.

A configurable threshold (eventBusLargePayloadThreshold) controls
when a warning is logged about large payloads. It defaults to the
jsonMaxStringSize value if set, aligning both inbound parsing limits
and outbound payload monitoring to the same configured size.
@ikalachy ikalachy requested a review from a team as a code owner June 9, 2026 14:22

@carlspring carlspring left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :)

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.

2 participants