User user = new User("nerd");
IntStream
.rangeClosed(1,100)
- .forEach(i ->sendMessage(chatRoom, user, "Message #" + i));
+ .mapToObj(i ->sendMessage(chatRoom, user, "Message #" + i))
+ .map(result -> result
+ .map(MessageTo::toString)
+ .block())
+ .forEach(result -> log.info("{}", result));
Thread.sleep(10000);
receiveMessage(chatRoom).subscribe(message -> log.info("message: {}", message));
"/{chatRoomId}",
chatRoom.getId())
.accept(MediaType.APPLICATION_OCTET_STREAM)
- .retrieve().bodyToFlux(byte[].class);
+ .retrieve()
+ .bodyToFlux(byte[].class);
}
@BeforeEach