Use Mono.share() for mrmMessageMono

This commit is contained in:
Chris Eager
2024-09-26 10:39:45 -05:00
committed by Chris Eager
parent 513f19370a
commit ab2e6bb9a3
2 changed files with 4 additions and 3 deletions

View File

@@ -444,7 +444,7 @@ public class MessagesCache extends RedisClusterPubSubAdapter<String, String> imp
conn -> conn.reactive().hmget(key, "data".getBytes(StandardCharsets.UTF_8), sharedMrmViewKey)
.collectList()
.publishOn(messageDeliveryScheduler)))
.handle((mrmDataAndView, sink) -> {
.<MessageProtos.Envelope>handle((mrmDataAndView, sink) -> {
try {
assert mrmDataAndView.size() == 2;
@@ -461,7 +461,8 @@ public class MessagesCache extends RedisClusterPubSubAdapter<String, String> imp
} catch (Exception e) {
sink.error(e);
}
});
})
.share();
experiment.compareMonoResult(mrmMessage.toBuilder().clearSharedMrmKey().build(), mrmMessageMono);