ensure generateId executes on the scheduler thread specified by publishOn.

Signed-off-by: qnnn <65326092+qnnn@users.noreply.github.com>
This commit is contained in:
qnnn
2025-03-03 14:55:47 +08:00
parent 0affb76a1a
commit 3bf194dad9

View File

@@ -65,7 +65,7 @@ public class CompositeRouteDefinitionLocator implements RouteDefinitionLocator {
}
protected Mono<String> randomId() {
return Mono.fromSupplier(idGenerator::generateId).map(UUID::toString).publishOn(Schedulers.boundedElastic());
return Mono.fromSupplier(idGenerator::generateId).publishOn(Schedulers.boundedElastic()).map(UUID::toString);
}
}