-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request response workspace #843
base: main
Are you sure you want to change the base?
Conversation
src/main/java/software/amazon/awssdk/crt/iot/MqttRequestResponseClient.java
Show resolved
Hide resolved
src/main/java/software/amazon/awssdk/crt/iot/MqttRequestResponseClientBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/software/amazon/awssdk/crt/iot/MqttRequestResponseClientBuilder.java
Outdated
Show resolved
Hide resolved
(void)jni_class; | ||
aws_cache_jni_ids(env); | ||
|
||
if (max_request_response_subscriptions < 0 || max_streaming_subscriptions < 0 || operation_timeout_seconds < 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be max_request_response_subscriptions < 2
? Also, a followup question: why duplicate this check here if aws-c-mqtt already validates it?
https://github.com/awslabs/aws-c-mqtt/blob/main/source/request-response/subscription_manager.c#L787
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's debatable: a creation failure requires log analysis to determine why, but with this redundant check the problem is embedded into the exception message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I see how it might benefit users. Let's keep it.
Initial request response client create/destroy APIs/tests.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.