Skip to content

Conversation

@JavaSaBr
Copy link
Owner

Implement QoS 1

@JavaSaBr JavaSaBr added the enhancement New feature or request label Nov 21, 2019
@JavaSaBr JavaSaBr requested a review from crazyrokr November 21, 2019 06:49
boolean SUBSCRIPTION_IDENTIFIER_AVAILABLE_DEFAULT = false;

int PACKET_ID_FOR_QOS_0 = 0;
int PACKET_ID_MAX = 0xFFFF;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is MAXIMUM_PACKET_ID the same ?

return;
}

pendingPublishes.runInWriteLock(publishes -> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

please extract to method

@Override
public void resendPendingPacketsAsync(@NotNull MqttClient client, int retryInterval) {
var currentTime = System.currentTimeMillis();
var stamp = pendingPublishes.readLock();
Copy link
Collaborator

Choose a reason for hiding this comment

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

runInReadLock can be used

Copy link
Owner Author

Choose a reason for hiding this comment

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

we don't have a version of this method with one object and one primitive argument

}

@Override
public @NotNull Mono<Boolean> store(@NotNull String clientId, @NotNull MqttSession session, long expiryInterval) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please make multi line

pendingPublishes.runInWriteLock(Collection::clear);
}

private void removeExpiredPackets(@NotNull Array<PendingPublish> publishes) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It can be static

@crazyrokr crazyrokr merged commit cd9d0f3 into develop Nov 23, 2019
@crazyrokr crazyrokr deleted the feature-broker-15 branch November 23, 2019 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants