Task Annotations

Subscribe here to follow Infinitic's development. Please ⭐️ us on Github!


A task instance is internally described by both its full java name (including its package) and the name of the method called.

In some situations we may want to avoid coupling those names with the underlying implementation, for example if we want to rename the class or method, or if we mix programming languages.

Infinitic provides a @Name annotation that let us declare explicitly the names that Infinitic should use internally. For example:

package hello.world.tasks;

import io.infinitic.annotations.Name;

public interface HelloWorldService {
    String sayHello(String name);

    String addEnthusiasm(String str);
package hello.world.tasks

import io.infinitic.annotations.Name

interface HelloWorldService {

    fun sayHello(name: String?): String

    fun addEnthusiasm(str: String): String

When using this annotation, the name setting in service worker configuration file should be the one provided by the annotation:

  - name: HelloService
    class: hello.world.tasks.HelloWorldServiceImpl
Edit this page on GitHub Updated at Sat, Sep 10, 2022