This libary is a smart client to the Foxtrot event storage and analytics framework.
Use the following repository in your pom.xml:
<repository>
<id>clojars</id>
<name>Clojars repository</name>
<url>https://clojars.org/repo</url>
</repository>
Use the following maven dependency:
<dependency>
<groupId>com.flipkart.foxtrot</groupId>
<artifactId>foxtrot-client</artifactId>
<version>0.2.2</version>
</dependency>
Initialize the Client like this:
FoxtrotClientConfig config = new FoxtrotClientConfig();
config.setTable("test"); //Your foxtrot table name
config.setLocalQueuePath("/tmp/foxtrot-messages"); //Giving this path means it will use the queued sender
config.setHost("foxtrot.yourdomain.com"); //Load balancer hostname/ip
config.setPort(80); //Load balancer port
FoxtrotClient foxtrotClient = new FoxtrotClient(config);
Send events:
foxtrotClient.send(
new Document(
UUID.randomUUID().toString(), //ID
System.currentTimeMillis(), //Timestamp
new ObjectNode(nodeFactory) //Data
.put("testField", "Santanu Sinha")
)
);
Close when done (program stop):
foxtrotClient.close();
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close