Skip to content

Why we must collect points to use the batch api? #381

Closed
@IdanFridman

Description

@IdanFridman

If I understand right we must aggregate Points in advanced in order to use the batchapi properly.

BatchPoints batchPoints = BatchPoints.database(influxDatabase).build();
for (Point point : points) {
batchPoints.point(point);
}
influxDB.write(batchPoints);

That mean I need to have a 'batching' logic that collect points and then every once in a while I need to use batchPoints.point(point) (the way I used above) to actually submit them.

Cant we just submit single points using batchPoints.point and relay on the batchingapi that every X time will do the insertion to the database?

thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions