Clients

Infinitic is still in active development. Subscribe here to follow its progress.

An Infinitic client lets us start, retry and cancel tasks or workflows, usually from your Web App controllers.

We can instantiate a client from a configuration file in the file system:

import io.infinitic.factory.InfiniticClientFactory;
import io.infinitic.client.InfiniticClient;
...
InfiniticClient client = InfiniticClientFactory.fromConfigFile("infinitic.yml");
import io.infinitic.factory.InfiniticClientFactory
...
val client = InfiniticClientFactory.fromConfigFile("infinitic.yml")

or in the resource folder:

import io.infinitic.factory.InfiniticClientFactory;
import io.infinitic.client.InfiniticClient;
...
InfiniticClient client = InfiniticClientFactory.fromConfigResource("/infinitic.yml");
import io.infinitic.factory.InfiniticClientFactory
...
val client = InfiniticClientFactory.fromConfigResource("/infinitic.yml")

The configuration file should contain:

  • a name (optional)
  • a pulsar entry describing how to connect to Pulsar (see here)
infinitic.yml
name: optional_client_name

pulsar: ...

When providing a name, it must be unique among all clients connected to Pulsar, as it will be used as Pulsar producer name.

Edit this page on GitHub Updated at Mon, Oct 25, 2021