Skip to content

Commit

Permalink
Reduce open slots in Test
Browse files Browse the repository at this point in the history
Moquette also generates commands on the queue internally, so pushing
too many concurrent subscriptions can overflow the queue.
  • Loading branch information
hylkevds committed May 29, 2023
1 parent 1e37358 commit 511b07e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void onePublishTriggerManySubscriptionsNotifications() throws MqttException, Int
}

private void segmentedParallelSubscriptions(BiConsumer<IMqttAsyncClient, IMqttActionListener> biConsumer) throws InterruptedException {
int openSlotCount = COMMAND_QUEUE_SIZE;
int openSlotCount = COMMAND_QUEUE_SIZE / 2;
Semaphore openSlots = new Semaphore(openSlotCount);
IMqttActionListener completionCallback = createMqttCallback(openSlots);
for (IMqttAsyncClient subscriber : this.subscribers) {
Expand Down

0 comments on commit 511b07e

Please sign in to comment.