Package io.micronaut.nats.connect
Class NatsConnectionFactoryConfig.JetStreamConfiguration.StreamConfiguration
java.lang.Object
io.micronaut.nats.connect.NatsConnectionFactoryConfig.JetStreamConfiguration.StreamConfiguration
- Enclosing class:
- NatsConnectionFactoryConfig.JetStreamConfiguration
@EachProperty("streams")
public static class NatsConnectionFactoryConfig.JetStreamConfiguration.StreamConfiguration
extends Object
Manages a single stream configuration.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.nats.client.api.StreamConfiguration.Builder
get the stream configuration builder.get the subjects of the stream.boolean
create or update stream during startup.void
setCreateOrUpdate
(boolean createOrUpdate) create or update stream during startup.void
setSubjects
(List<String> subjects) set the subjects.io.nats.client.api.StreamConfiguration
return the configuration asStreamConfiguration
.
-
Constructor Details
-
StreamConfiguration
-
-
Method Details
-
getBuilder
public io.nats.client.api.StreamConfiguration.Builder getBuilder()get the stream configuration builder.- Returns:
- stream configuration builder
-
toStreamConfiguration
public io.nats.client.api.StreamConfiguration toStreamConfiguration()return the configuration asStreamConfiguration
.- Returns:
- nats stream configuration
-
getSubjects
get the subjects of the stream.- Returns:
- the subjects
-
setSubjects
set the subjects.- Parameters:
subjects
- list of subjects
-
isCreateOrUpdate
public boolean isCreateOrUpdate()create or update stream during startup.- Returns:
- true, if stream should be created or updated
- Since:
- 4.4.0
-
setCreateOrUpdate
public void setCreateOrUpdate(boolean createOrUpdate) create or update stream during startup.- Parameters:
createOrUpdate
- true to create or update stream during startup- Since:
- 4.4.0
-