forked from thin-edge/thin-edge.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(thin-edge#3279): plug AvailabilityActor directly to MQTT actor
Because the C8yMapperActor synchronously first receives a message from the input channel, and then produces output by sending to the output channel, if one of these channels block, the other one will also not be processed. In this case, there was a loop: C8yMapperActor sent `MqttMessage`s to AvailabilityActor, and AvailabilityActor send `PublishMessage`s to C8yMapperActor for it to relay it to MqttActor. When a sender for `PublishMessage`s was full when AvailabilityActor tried sending another message, it would block, so until this message was processed, AvailabilityActor wasn't processing now input. However, if before this output was sent by C8yMapperActor there was another message to relay to AvailabilityActor, and the inbound channel was also full, this would result in a deadlock where neither AvailabilityActor input or output could be sent through. Signed-off-by: Marcel Guzik <[email protected]>
- Loading branch information
Showing
3 changed files
with
39 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters