Skip to content

Conversation

@alexbumbacea
Copy link

We have a use case for messages larger than 1MB, hence making this configurable would help.
In order to discover the source of our problems we had to spend some time investigating, as errors were silently discarded. So we also included changes to improving surfacing errors .

Copy link
Contributor

@findleyr findleyr left a comment

Choose a reason for hiding this comment

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

Let's discuss this change in #726. I'm not sure we shouldn't just remove the buffering.

// http.DefaultClient is used.
HTTPClient *http.Client

// MaxLineSize is the maximum buffer size used when reading a message. It defaults to 1MB
Copy link
Contributor

Choose a reason for hiding this comment

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

"MaxLineSize is the maximum buffer size (in bytes) used when reading SSE events. If unset, defaults to 1MiB."

Here, and in the streamable client.

const maxTokenSize = 1 * 1024 * 1024 // 1 MiB max line size
scanner.Buffer(nil, maxTokenSize)
if maxLineSize == 0 {
maxLineSize = 1 * 1024 * 1024 // defaults to 1MB
Copy link
Contributor

Choose a reason for hiding this comment

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

MiB was correct.

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