Skip to content

Commit a407891

Browse files
committed
Added functionality to process reply to subs in new thread
This is required if the service is available and is injected to the service tracker, it blocks the startup as it happens in the same thread
1 parent 52ff72c commit a407891

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

in.bytehue.messaging.mqtt5.provider/src/main/java/in/bytehue/messaging/mqtt5/provider/MessageReplyToWhiteboardProvider.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public synchronized ReplyToSingleSubscriptionHandler addingService(
125125
final ReplyToSubDTO sub = new ReplyToSubDTO(handler, REPLY_TO_SINGLE_SUB, reference);
126126
subscriptions.add(sub);
127127

128-
processReplyToSingleSubscriptionHandler(sub);
128+
new Thread(() -> processReplyToSingleSubscriptionHandler(sub)).start();
129129
return handler;
130130
}
131131

@@ -152,7 +152,7 @@ public synchronized ReplyToSubscriptionHandler addingService(
152152
final ReplyToSubDTO sub = new ReplyToSubDTO(handler, REPLY_TO_SUB, reference);
153153
subscriptions.add(sub);
154154

155-
processReplyToSubscriptionHandler(sub);
155+
new Thread(() -> processReplyToSubscriptionHandler(sub)).start();
156156
return handler;
157157
}
158158

@@ -179,7 +179,7 @@ public synchronized ReplyToManySubscriptionHandler addingService(
179179
final ReplyToSubDTO sub = new ReplyToSubDTO(handler, REPLY_TO_MANY_SUB, reference);
180180
subscriptions.add(sub);
181181

182-
processReplyToManySubscriptionHandler(sub);
182+
new Thread(() -> processReplyToManySubscriptionHandler(sub)).start();
183183
return handler;
184184
}
185185

0 commit comments

Comments
 (0)