A faster, simpler, dependency-less pub-sub event bus.
Get it via JitPack:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.github.nevalackin</groupId>
<artifactId>radbus</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'io.github.nevalackin:radbus:1.0.0'
}
or via the prebuilt artifacts on the releases page.
Results were obtained using the JMH benchmarking framework with OpenJDK 17, the benchmark code is available in the jmh module.
Benchmark | Mode | Cnt | Score | Error | Units |
---|---|---|---|---|---|
GlobalListenerPublishBenchmark | avgt | 5 | 4.622 | ± 0.245 | ms/op |
GlobalSubscribeBenchmark | avgt | 5 | 61.489 | ns/op | |
NoListenerPublishBenchmark | avgt | 5 | 1.101 | ± 0.022 | ms/op |
PublishBenchmark | avgt | 5 | 4.757 | ± 0.072 | ms/op |
SubscribeBenchmark | avgt | 5 | 37122.753 | ± 5428.944 | ns/op |
SubscribeUnsubscribeBenchmark | avgt | 5 | 35792.825 | ± 4918.771 | ns/op |