Conversation
…is absent ContextInitPipeline only records the remaining deadline time when the gRPC call actually carries a deadline. For a call without one - which gRPC allows - ctx.getRemainingMs() returned null and the unboxing in the pollingTime computation threw a NullPointerException, which the catch block turned into an INTERNAL_SERVER_ERROR response. Treat an absent deadline as grpcClientConsumerMaxLongPollingTimeoutMillis remaining time: pollingTime and the timeout passed to popMessage stay bounded by the configured maximum instead of crashing.
RockteMQ-AI
approved these changes
Sep 11, 2026
RockteMQ-AI
left a comment
Contributor
There was a problem hiding this comment.
Summary
Fall back to grpcClientConsumerMaxLongPollingTimeoutMillis when the gRPC deadline is absent (null remainingMs), instead of relying on auto-unboxing which would throw NPE.
LGTM — clean null safety fix.
Automated review by github-manager-bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
ContextInitPipelineonly records the remaining deadline time when the gRPC call actually carries a deadline. For a call without one — which gRPC allows —ctx.getRemainingMs()returned null and the unboxing in the polling-time computation threw aNullPointerException, which the catch block turned into anINTERNAL_SERVER_ERRORresponse.Modifications
Treat an absent deadline as
grpcClientConsumerMaxLongPollingTimeoutMillisremaining time, so polling time and the timeout passed topopMessagestay bounded by the configured maximum instead of crashing.Verification
Fail-before (new test, run against the unpatched code):
Pass-after: