From 3b90e2695c6f878f78ef7d1699711d8bbca6ae40 Mon Sep 17 00:00:00 2001 From: Scott Balmos <399112+sbalmos@users.noreply.github.com> Date: Fri, 3 Jan 2025 13:09:25 -0500 Subject: [PATCH] fix(gcp_pubsub source): Remove Tonic default 4MB decode size limit (#22091) * Remove Tonic default 4MB decode size limit * Changelog entry * Update changelog.d/22090_remove_gcp_pubsub_msg_size_limit.fix.md --------- Co-authored-by: Jesse Szwedko Co-authored-by: Jesse Szwedko --- changelog.d/22090_remove_gcp_pubsub_msg_size_limit.fix.md | 3 +++ src/sources/gcp_pubsub.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelog.d/22090_remove_gcp_pubsub_msg_size_limit.fix.md diff --git a/changelog.d/22090_remove_gcp_pubsub_msg_size_limit.fix.md b/changelog.d/22090_remove_gcp_pubsub_msg_size_limit.fix.md new file mode 100644 index 0000000000000..c7323afe4ff89 --- /dev/null +++ b/changelog.d/22090_remove_gcp_pubsub_msg_size_limit.fix.md @@ -0,0 +1,3 @@ +The `gcp_pubsub` source no longer has a 4MB message size limit. + +authors: sbalmos diff --git a/src/sources/gcp_pubsub.rs b/src/sources/gcp_pubsub.rs index ea26e00de53ea..3fce9bb605046 100644 --- a/src/sources/gcp_pubsub.rs +++ b/src/sources/gcp_pubsub.rs @@ -479,7 +479,9 @@ impl PubsubSource { } Ok(req) }, - ); + ) + // Tonic added a default of 4MB in 0.9. This replaces the old behavior. + .max_decoding_message_size(usize::MAX); let (ack_ids_sender, ack_ids_receiver) = mpsc::channel(ACK_QUEUE_SIZE);