Annotation Interface PulsarProducer
@Documented
@Retention(RUNTIME)
@Target(METHOD)
@Around
@Introduction
@Type(PulsarProducerAdvice.class)
public @interface PulsarProducer
Marks a method that should produce values to Pulsar topics on call.
- Since:
- 1.0
- Author:
- Haris Secic
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanbooleanintDefault 128KB.intbooleanbooleanIf this is enabled batching should be disabled.org.apache.pulsar.client.api.CompressionTypeorg.apache.pulsar.client.api.HashingSchemelongorg.apache.pulsar.common.schema.KeyValueEncodingTypeIf noMessageKeyannotated method argument is detected this attribute is ignored and message is treated as simple - without a key.org.apache.pulsar.client.api.MessageRoutingModebooleanbooleanDefaults to false.
-
Element Details
-
value
-
producerName
-
topic
-
schema
-
keySchema
-
keyEncoding
org.apache.pulsar.common.schema.KeyValueEncodingType keyEncodingIf noMessageKeyannotated method argument is detected this attribute is ignored and message is treated as simple - without a key.- Returns:
- Whether key will be in the message payload or separate.
- Default:
INLINE
-
compressionType
org.apache.pulsar.client.api.CompressionType compressionType- Returns:
- Compression type.
- Default:
NONE
-
messageRoutingMode
org.apache.pulsar.client.api.MessageRoutingMode messageRoutingMode- Returns:
- Message routing mode.
- Default:
RoundRobinPartition
-
multiSchema
boolean multiSchema- Returns:
- Produce messages of different schemas than specified at creation time
- Default:
true
-
autoUpdatePartition
boolean autoUpdatePartition- Returns:
- Discover new partitions at runtime
- Default:
true
-
blockQueue
boolean blockQueue- Returns:
- Multiple calls to send and sendAsync will block if queue full
- Default:
false
-
batching
boolean batching- Returns:
- Enabled automatic batching of messages
- Default:
true
-
batchingMaxMessages
int batchingMaxMessages- Returns:
- Max messages in one batch
- Default:
1000
-
batchingMaxBytes
int batchingMaxBytesDefault 128KB.- Returns:
- Max bytes per batch
- Default:
131072
-
chunking
boolean chunkingIf this is enabled batching should be disabled.- Returns:
- Split messages in chunks if bigger than max allowed size.
- Default:
false
-
encryptionKey
-
initialSequenceId
long initialSequenceId- Returns:
- Starting sequence ID for producer
- Default:
-9223372036854775808L
-
hashingScheme
org.apache.pulsar.client.api.HashingScheme hashingScheme- Returns:
- Change hashing scheme used to choose partition
- Default:
JavaStringHash
-
sendBefore
boolean sendBeforeDefaults to false. Will be used to determine whether to send message prior to executing method code or after.- Returns:
- Whether to send the message before calling actual implementation.
- Default:
false
-