Skip to content

addEventAsync() issue under load #65

Open
@yoanntrouillet

Description

@yoanntrouillet

We are having some issues with the Keen.io java client we are pushing a lot of events. those event are leagcy event and we are overriding the timestamp value of each event. We using the addEventAsync() method.

what we observed is that under load this does not work as expected and events are dropped.

    protected Executor getDefaultPublishExecutor() throws Exception {
        int procCount = Runtime.getRuntime().availableProcessors();
        return Executors.newFixedThreadPool(procCount);
    }

which returns a instances of ThreadPoolExecutor as per
public static ExecutorService newFixedThreadPool(int nThreads) {
return new ThreadPoolExecutor(nThreads, nThreads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue());
}

We think the TreadPoolExecutor implementation drops requests when all the threads are busy doing pushing event to keen.io

We cannot use sendQueuedEventsAsync() as we need to control the timestamp value of the events ?

I don't really understand (didn't look into it) why we cannot specified (override) the timestamp of the events when queuing them ?

any other suggestion on how we could this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions