I'm evaluating mixpanel as a replacement for our current elasticsearch solution, and am trying to use the Java API to import last 6 months of data.
I can’t find a way to do this uśing the java api. Do I need to use the import-events http endpoints for this since the data is older than 5 days? I'm getting "Server refused to accept messages, they may be malformed" when I try to add the "time" property using this snippet:
ClientDelivery delivery = new ClientDelivery();
MessageBuilder messageBuilder = new MessageBuilder(mixPanelProjectToken);
JSONObject properties = new JSONObject();
properties.put("time", TimeUnit.MILLISECONDS.toSeconds(event.getEpochTime()));
JSONObject sendEvent = messageBuilder.event(event.getUserId(), event.getType().name(), properties);
delivery.addMessage(sendEvent);
MixpanelAPI mixpanel = new MixpanelAPI();
mixpanel.deliver(delivery);