Foxtrot Client Library

Foxtrot client library for ingesting events into foxtrot

Лицензия

Лицензия

Категории

Категории

CLI Взаимодействие с пользователем ORM Данные
Группа

Группа

io.appform.foxtrot
Идентификатор

Идентификатор

foxtrot-client
Последняя версия

Последняя версия

3.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Foxtrot Client Library
Foxtrot client library for ingesting events into foxtrot
Ссылка на сайт

Ссылка на сайт

https://github.com/appform-io/foxtrot-client
Система контроля версий

Система контроля версий

https://github.com/appform-io/foxtrot-client

Скачать foxtrot-client

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.appform.foxtrot/foxtrot-client/ -->
<dependency>
    <groupId>io.appform.foxtrot</groupId>
    <artifactId>foxtrot-client</artifactId>
    <version>3.1</version>
</dependency>
// https://jarcasting.com/artifacts/io.appform.foxtrot/foxtrot-client/
implementation 'io.appform.foxtrot:foxtrot-client:3.1'
// https://jarcasting.com/artifacts/io.appform.foxtrot/foxtrot-client/
implementation ("io.appform.foxtrot:foxtrot-client:3.1")
'io.appform.foxtrot:foxtrot-client:jar:3.1'
<dependency org="io.appform.foxtrot" name="foxtrot-client" rev="3.1">
  <artifact name="foxtrot-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.appform.foxtrot', module='foxtrot-client', version='3.1')
)
libraryDependencies += "io.appform.foxtrot" % "foxtrot-client" % "3.1"
[io.appform.foxtrot/foxtrot-client "3.1"]

Зависимости

compile (10)

Идентификатор библиотеки Тип Версия
com.google.guava : guava jar 19.0
com.netflix.feign : feign-okhttp jar 8.15.1
com.netflix.feign : feign-slf4j jar 8.15.1
com.netflix.feign : feign-jackson jar 8.15.1
org.hibernate : hibernate-validator jar 5.1.3.Final
com.bluejeans : bigqueue jar 1.7.0.6
org.apache.commons : commons-lang3 jar 3.4
org.slf4j : slf4j-api jar 1.7.6
com.netflix.feign : feign-core jar 8.15.1
com.squareup.okhttp : okhttp jar 2.7.0

provided (1)

Идентификатор библиотеки Тип Версия
com.fasterxml.jackson.core : jackson-databind jar 2.6.3

test (3)

Идентификатор библиотеки Тип Версия
ch.qos.logback : logback-classic jar 1.1.2
junit : junit jar 4.12
com.github.tomakehurst : wiremock jar 1.58

Модули Проекта

Данный проект не имеет модулей.

Foxtrot Client Travis build status

This libary is a smart client to the Foxtrot event storage and analytics framework.

  • Uses service discovery to find foxtrot nodes
  • Maintains connection pool to individual nodes
  • Maintains local cache of nodes
  • Provides configurable node selectors to send a message
  • Provides multiple types of event senders:
    • Synchronous event sender. It sends one or more events directly to Foxtrot.
    • Queued event sender.
      • Uses a persistent disk based queue.
      • Uses a syncronous sender on a separate thread to batch and send events to Foxtrot.

Usage

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>

Show me the code

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();

Версии библиотеки

Версия
3.1
3.0