Skip to content

Commit

Permalink
[#1228] also start AcknowledgementAggregatorActor for "smart channel …
Browse files Browse the repository at this point in the history
…commands" + validate command responses also for those

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed Dec 22, 2021
1 parent dca1a03 commit d5f95d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ private void handleThingCommandResponse(final ThingCommandResponse<?> thingComma

private MatchingValidationResult validateResponse(final CommandResponse<?> commandResponse) {
final MatchingValidationResult result;
if (SignalInformationPoint.isLiveCommand(originatingSignal)) {
if (SignalInformationPoint.isLiveCommand(originatingSignal) ||
SignalInformationPoint.isChannelSmart(originatingSignal)) {
result = tryToValidateLiveResponse((Command<?>) originatingSignal, commandResponse);
} else {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ private static boolean shouldStartForIncoming(final Signal<?> signal) {
final boolean result;

final var isLiveSignal = SignalInformationPoint.isChannelLive(signal);
final var isChannelSmart = SignalInformationPoint.isChannelSmart(signal);
final Collection<AcknowledgementRequest> ackRequests = signal.getDittoHeaders().getAcknowledgementRequests();
if (signal instanceof ThingModifyCommand && !isLiveSignal) {
result = ackRequests.stream().anyMatch(AcknowledgementForwarderActorStarter::isNotLiveResponse);
Expand All @@ -288,7 +289,7 @@ private static boolean shouldStartForIncoming(final Signal<?> signal) {

result = ackRequests.stream().anyMatch(AcknowledgementForwarderActorStarter::isNotTwinPersisted);
} else {
result = false;
result = isChannelSmart;
}

return result;
Expand Down

0 comments on commit d5f95d6

Please sign in to comment.