franz1981 edited a comment on pull request #3217:
URL: https://github.com/apache/activemq-artemis/pull/3217#issuecomment-657700006
Adding this test to `MQTTTest`:
```java
@Test
public void testSendAndReceiveMQTTManyQueues() throws Exception {
final int NUM_QUEUES = 10_000;
final MQTTClientProvider subscriptionProvider =
getMQTTClientProvider();
initializeConnection(subscriptionProvider);
final long start = System.currentTimeMillis();
for (int i = 0; i < NUM_QUEUES;i++) {
subscriptionProvider.subscribe("foo/" + i, AT_MOST_ONCE);
}
final long end = System.currentTimeMillis();
long elapsed = end - start;
System.out.println("SUBSCRIBED TO " + NUM_QUEUES + " in " + elapsed +
" ms");
for (int i = 0; i < NUM_QUEUES;i++) {
subscriptionProvider.unsubscribe("foo/" + i);
}
elapsed = System.currentTimeMillis() - end;
System.out.println("UNSUBSCRIBED TO " + NUM_QUEUES + " in " + elapsed
+ " ms");
subscriptionProvider.disconnect();
}
```
Shows that this PR deliver a ~2X improvement over `master` on subscribe
performance.
Although not a rigorous benchmark, it already shows a tangible improvement
over `master`: the real deal would be to move the MQTT logic outside the Netty
loop to save it from being blocked while iterating all the bindings..
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]