eclipse-ditto/ditto

Not able to fetch all connections via the http connection api when there are more than 100 connections

JeffreyThijs opened this issue · 1 comments

When i request all connection via the connection http api while having more than 100 connection, I receive following error message:

{
    "status": 400,
    "error": "connectivity:connections.amount.illegal",
    "message": "The amount of requested exceptions exceeds the limit of '100'.",
    "description": "Please request less connection ids."
}

This limit seems to be configured via:

https://github.com/eclipse-ditto/ditto/blob/master/gateway/service/src/main/resources/gateway.conf#L220

Currently, you can not configure this option via an environment variable so it would be a good idea to add this to allow a quick fix. A better solution would be add pagination to the endpoint like what is done with the search things http api.

Hi @JeffreyThijs

Indeed, configuring it via ENV var would be a quick win for this.
In the meantime, you can configure every HOCON (the config format) setting via Java system properties.
In this case, this would be a parameter to the JVM:

-Dditto.gateway.command.connections-retrieve-limit=1337

And yes - eventually we will need pagination on this API.