Skip to content

Commit 09becb8

Browse files
committed
refactor: convert message body to string
1 parent c2abd6c commit 09becb8

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

acceptance/async-tests/src/test/java/org/reactivecommons/test/perf/BlockingCommandHandlePerfTest.java

-3
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,8 @@ public Sinks.Many<Command<Long>> listener() {
9090

9191
private DomainCommandHandler<Long> handle(Sinks.Many<Command<Long>> listener) {
9292
return command -> fromRunnable(() -> {
93-
// out.println("Received at: " + System.currentTimeMillis()/1000);
9493
try {
95-
// out.println("internal: " + Thread.currentThread().getName());
9694
TimeUnit.MILLISECONDS.sleep(750);
97-
// out.println("Handled at: " + System.currentTimeMillis()/1000);
9895
listener.emitNext(command, Sinks.EmitFailureHandler.FAIL_FAST);
9996
} catch (InterruptedException ignored) {
10097
}

acceptance/async-tests/src/test/java/org/reactivecommons/test/perf/ParallelOnBlockingInSubscriptionTimeTest.java

-3
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,8 @@ public Sinks.Many<Command<Long>> listener() {
9191

9292
private DomainCommandHandler<Long> handle(Sinks.Many<Command<Long>> listener) {
9393
return command -> {
94-
// out.println("Received at: " + System.currentTimeMillis()/1000);
9594
try {
96-
// out.println("internal: " + Thread.currentThread().getName());
9795
TimeUnit.MILLISECONDS.sleep(750);
98-
// out.println("Handled at: " + System.currentTimeMillis()/1000);
9996
listener.emitNext(command, Sinks.EmitFailureHandler.FAIL_FAST);
10097
} catch (InterruptedException e) {
10198
}

async/async-commons/src/main/java/org/reactivecommons/async/commons/DLQDiscardNotifier.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.reactivecommons.async.commons.exceptions.MessageConversionException;
1414
import reactor.core.publisher.Mono;
1515

16-
import java.util.Arrays;
1716
import java.util.logging.Level;
1817

1918
import static java.lang.String.format;
@@ -54,7 +53,7 @@ private Mono<Void> notify(Message message) {
5453
private Mono<Void> notifyUnreadableMessage(Message message, MessageConversionException e) {
5554
String bodyString;
5655
try {
57-
bodyString = Arrays.toString(message.getBody());
56+
bodyString = new String(message.getBody());
5857
} catch (Exception ex) {
5958
bodyString = "Opaque binary Message, unable to decode: " + ex.getMessage();
6059
}

0 commit comments

Comments
 (0)