Clients

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

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

  • a Pulsar Client ,
  • the tenant / namespace dedicated to Infinitic,
  • a name (optional):
import io.infinitic.pulsar.PulsarInfiniticClient;
...

InfiniticClient client = PulsarInfiniticClient(
    pulsarClient,
    pulsarTenant,
    pulsarNamespace,
    clientName
);
import io.infinitic.pulsar.PulsarInfiniticClient
...

var client = PulsarInfiniticClient(
    pulsarClient,
    pulsarTenant,
    pulsarNamespace,
    clientName
)

When providing a name, this name MUST be unique among your different machines, as it will be used as Pulsar producer name.

We can also create a client from a configuration file in your file system:

InfiniticClient client = PulsarInfiniticClient.fromConfigFile("infinitic.yml");
var client = PulsarInfiniticClient.fromConfigFile("infinitic.yml")

or in your resource folder

InfiniticClient client = PulsarInfiniticClient.fromConfigResource("/infinitic.yml");
var client = PulsarInfiniticClient.fromConfigResource("/infinitic.yml")

with:

infinitic.yml
name: devClient

pulsar:
  serviceUrl: pulsar://localhost:6650
  serviceHttpUrl: http://localhost:8080
  tenant: infinitic
  namespace: dev
Edit this page on GitHub Updated at Fri, May 28, 2021