Checkboxes for prior research
Describe the bug
We are using the NodeJS package @aws-sdk/client-iot-data-plane to interact with AWS IoT Core. Since the update from v3.928.0 to v3.929.0 we can no longer delete retained messages. We usually send undefined in the payload of the PublishCommand. However with the new SDK version the topic is actually set to an empty object ({}) instead of being deleted. We also tried sending null or empty string ''. Always with the same result.
Regression Issue
SDK version number
@aws-sdk/client-iot-data-plane@3.928.0 --> @aws-sdk/client-iot-data-plane@3.929.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v22.18.0
Reproduction Steps
- Publish a payload to an MQTT topic.
- Publish
undefined to the same MQTT topic.
- Check whether retained topic still exists. --> Should result in
ResourceNotFoundException
import {
GetRetainedMessageCommand,
IoTDataPlaneClient,
PublishCommand
} from '@aws-sdk/client-iot-data-plane';
const client = new IoTDataPlaneClient({
region: 'eu-central-1'
});
await client.send(
new PublishCommand({
payload: JSON.stringify({
test: 'data'
}),
retain: true,
topic: 'test'
})
);
console.log(
'topic exists:',
await client
.send(
new GetRetainedMessageCommand({
topic: 'test'
})
)
.then(() => true)
.catch(() => false)
);
await client.send(
new PublishCommand({
payload: undefined,
retain: true,
topic: 'test'
})
);
console.log(
'topic exists:',
await client
.send(
new GetRetainedMessageCommand({
topic: 'test'
})
)
.then(() => true)
.catch(() => false)
);
Observed Behavior
Retained topic is not being deleted.
Expected Behavior
Retained topic should have been deleted.
Possible Solution
No response
Additional Information/Context
No response
Checkboxes for prior research
Describe the bug
We are using the NodeJS package
@aws-sdk/client-iot-data-planeto interact with AWS IoT Core. Since the update from v3.928.0 to v3.929.0 we can no longer delete retained messages. We usually sendundefinedin the payload of thePublishCommand. However with the new SDK version the topic is actually set to an empty object ({}) instead of being deleted. We also tried sendingnullor empty string''. Always with the same result.Regression Issue
SDK version number
@aws-sdk/client-iot-data-plane@3.928.0 --> @aws-sdk/client-iot-data-plane@3.929.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v22.18.0
Reproduction Steps
undefinedto the same MQTT topic.ResourceNotFoundExceptionObserved Behavior
Retained topic is not being deleted.
Expected Behavior
Retained topic should have been deleted.
Possible Solution
No response
Additional Information/Context
No response