JVM - topic()

Creates a new Topic.

import io.nitric.Nitric;
import io.nitric.resources.TopicPermission;
public class Application {
public static void main(String[] args) {
var topic = Nitric.INSTANCE.topic("topic").with(TopicPermission.Publishing);
Nitric.INSTANCE.run();
}
}

Parameters

  • Name
    name
    Required
    Required
    Type
    String
    Description

    The name of the topic to create.

Examples

Create a new topic

import io.nitric.Nitric;
import io.nitric.resources.TopicPermission;
public class Application {
public static void main(String[] args) {
var topic = Nitric.INSTANCE.topic("topic").with(TopicPermission.Publishing);
Nitric.INSTANCE.run();
}
}

See also

Last updated on Oct 11, 2024