File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
sdk/src/main/java/software/amazon/awssdk/iot/iotcommands Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -151,13 +151,19 @@ public CompletableFuture<UpdateCommandExecutionResponse> updateCommandExecution(
151
151
152
152
// Response paths
153
153
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 );
156
159
builder .withResponsePath (pathBuilder1 .build ());
157
160
158
161
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 );
161
167
builder .withResponsePath (pathBuilder2 .build ());
162
168
163
169
// Submit
You can’t perform that action at this time.
0 commit comments