@Documented @Retention(value=RUNTIME) @Target(value={PARAMETER,FIELD,METHOD}) @Around @Introduction public @interface PulsarReader
Modifier and Type | Optional Element and Description |
---|---|
org.apache.pulsar.common.schema.KeyValueEncodingType |
keyEncoding
If argument annotated with
PulsarReader is of KeyValue
it's possible to choose where to get the message key from. |
MessageSchema |
keySchema
If argument annotated with
PulsarReader is of KeyValue it's
possible to choose different schema for key transfer. |
String |
readerName |
@Min(value=0L) int |
readTimeout
Ignored on
Reader.readNextAsync() . |
MessageSchema |
schema
|
boolean |
startMessageLatest |
boolean |
subscribeAsync
By default, reader should subscribe in non-blocking manner using default
CompletableFuture
of ConsumerBuilder.subscribeAsync() . |
String |
subscriptionName |
TimeUnit |
timeoutUnit
Ignored on
Reader.readNextAsync() or if
readTimeout() is 0. |
@Pattern(regexp="((non-)?persistent://)?((\\w+(-|\\w+)*\\w/)|(\\$\\{tenant\\}))(\\w+(-|\\w+)*\\w/)\\w+(-|\\w+)*\\w") String |
topic
Only single topic subscription possible for readers.
|
String |
value |
@AliasFor(member="value") @AliasFor(annotation=io.micronaut.messaging.annotation.MessageMapping.class,member="value") @Pattern(regexp="((non-)?persistent://)?((\\w+(-|\\w+)*\\w/)|(\\$\\{tenant\\}))(\\w+(-|\\w+)*\\w/)\\w+(-|\\w+)*\\w") public abstract @Pattern(regexp="((non-)?persistent://)?((\\w+(-|\\w+)*\\w/)|(\\$\\{tenant\\}))(\\w+(-|\\w+)*\\w/)\\w+(-|\\w+)*\\w") String topic
public abstract String subscriptionName
public abstract MessageSchema schema
public abstract MessageSchema keySchema
PulsarReader
is of KeyValue
it's
possible to choose different schema for key transfer.public abstract org.apache.pulsar.common.schema.KeyValueEncodingType keyEncoding
PulsarReader
is of KeyValue
it's possible to choose where to get the message key from. Otherwise, this attribute is ignored.public abstract String readerName
public abstract boolean subscribeAsync
CompletableFuture
of ConsumerBuilder.subscribeAsync()
.
If blocking is set to false, application thread initializing it will block until consumer is successfully subscribed.
public abstract boolean startMessageLatest
@Min(value=0L) public abstract @Min(value=0L) int readTimeout
Reader.readNextAsync()
.
Use -1 for no timeout (default).public abstract TimeUnit timeoutUnit
Reader.readNextAsync()
or if
readTimeout()
is 0.readTimeout()
.