File tree Expand file tree Collapse file tree
sdk/src/main/java/software/amazon/awssdk/iot/iotcommands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,13 +151,19 @@ public CompletableFuture<UpdateCommandExecutionResponse> updateCommandExecution(
151151
152152 // Response paths
153153 ResponsePath .ResponsePathBuilder pathBuilder1 = ResponsePath .builder ();
154- String responseTopic1 = publishTopic + "/accepted" ;
155- pathBuilder1 .withResponseTopic (publishTopic + "/accepted" );
154+ String responseTopic1 = "$aws/commands/{deviceType}/{deviceId}/executions/{executionId}/response/accepted/json" ;
155+ responseTopic1 = responseTopic1 .replace ("{deviceType}" , request .deviceType .toString ());
156+ responseTopic1 = responseTopic1 .replace ("{deviceId}" , request .deviceId );
157+ responseTopic1 = responseTopic1 .replace ("{executionId}" , request .executionId );
158+ pathBuilder1 .withResponseTopic (responseTopic1 );
156159 builder .withResponsePath (pathBuilder1 .build ());
157160
158161 ResponsePath .ResponsePathBuilder pathBuilder2 = ResponsePath .builder ();
159- String responseTopic2 = publishTopic + "/rejected" ;
160- pathBuilder2 .withResponseTopic (publishTopic + "/rejected" );
162+ String responseTopic2 = "$aws/commands/{deviceType}/{deviceId}/executions/{executionId}/response/rejected/json" ;
163+ responseTopic2 = responseTopic2 .replace ("{deviceType}" , request .deviceType .toString ());
164+ responseTopic2 = responseTopic2 .replace ("{deviceId}" , request .deviceId );
165+ responseTopic2 = responseTopic2 .replace ("{executionId}" , request .executionId );
166+ pathBuilder2 .withResponseTopic (responseTopic2 );
161167 builder .withResponsePath (pathBuilder2 .build ());
162168
163169 // Submit
You can’t perform that action at this time.
0 commit comments