Skip to content

Fix: Subscription fails on AWS IoT Core broker #876

Merged
AlvaroVega merged 4 commits intotelefonicaid:masterfrom
Sheile:task/support-aws-iot-core
May 19, 2025
Merged

Fix: Subscription fails on AWS IoT Core broker #876
AlvaroVega merged 4 commits intotelefonicaid:masterfrom
Sheile:task/support-aws-iot-core

Conversation

@Sheile
Copy link
Copy Markdown
Contributor

@Sheile Sheile commented May 15, 2025

Issue: #875

After merged it. I'll create same PR against to telefonicaid/iotagent-ul.

@AlvaroVega
Copy link
Copy Markdown
Member

Maybe this fix #633 could help to reduce the number of topics subscribed by iotagent.

@Sheile
Copy link
Copy Markdown
Contributor Author

Sheile commented May 16, 2025

@AlvaroVega
Thank you for your quick reply.
PR #633 reduces the number of topics per SUBSCRIBE packet from 16 to 10, but AWS IoT Core’s quota is 8. Therefore, PR #633 does not resolve issue #875.

Comment thread CHANGES_NEXT_RELEASE
@@ -1 +1,2 @@
- Fix: bad json measures are reported as 500 Error instead of 400 (#863)
- Fix: Subscription fails on AWS IoT Core broker (#875)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CNR update should include upgrade dependence version mqtt from 4.X to 5.X

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 016af88

Comment thread lib/bindings/MQTTBinding.js Outdated
keepalive: mqttConfig.keepalive ? parseInt(mqttConfig.keepalive) : 60,
connectTimeout: 60 * 60 * 1000
connectTimeout: 60 * 60 * 1000,
subscribeBatchSize: 8
Copy link
Copy Markdown
Member

@AlvaroVega AlvaroVega May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According with doc: https://www.npmjs.com/package/mqtt

subscribeBatchSize : optional number Maximum number of topics per SUBSCRIBE packet. When the number of topics to subscribe exceeds this value, the client will automatically split them into multiple SUBSCRIBE packets of this size.

but what is the default value used by subscribeBatchSize if none is provided ? Not sure if this new conf should be added into mqttConfig.
I guess default value for subscribeBatchSize is null, so this should be the default value used and then subscribeBatchSize should be added to mqttConfig (like keepalive or others conf options) to be modified by local configuration (i.e. docker env var).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b18cec2

@fgalan
Copy link
Copy Markdown
Member

fgalan commented May 19, 2025

@Sheile thanks for your contribution!

I'll create same PR against to telefonicaid/iotagent-ul.

Actually, this is not needed, as IOTA-UL is now in deprecated state.

@Sheile Sheile force-pushed the task/support-aws-iot-core branch from 387f20f to 4c3b914 Compare May 19, 2025 09:46
@Sheile Sheile force-pushed the task/support-aws-iot-core branch from 4c3b914 to b18cec2 Compare May 19, 2025 09:48
Copy link
Copy Markdown
Member

@AlvaroVega AlvaroVega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for your contribution @Sheile !
LGTM

@AlvaroVega AlvaroVega merged commit c511053 into telefonicaid:master May 19, 2025
16 of 19 checks passed
@Sheile Sheile deleted the task/support-aws-iot-core branch May 19, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants