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
  • Element Details

    • value

      @AliasFor(member="topic") String value
      Returns:
      Same as topic()
      Default:
      ""
    • producerName

      String producerName
      Returns:
      Producer name.
      Default:
      ""
    • topic

      @AliasFor(member="value") String topic
      Returns:
      Topic to produce messages to
      Default:
      ""
    • schema

      Returns:
      Type of message serialization.
      Default:
      BYTES
    • keySchema

      MessageSchema keySchema
      Returns:
      Type of message key serialization.
      Default:
      BYTES
    • keyEncoding

      org.apache.pulsar.common.schema.KeyValueEncodingType keyEncoding
      If no MessageKey annotated 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 batchingMaxBytes
      Default 128KB.
      Returns:
      Max bytes per batch
      Default:
      131072
    • chunking

      boolean chunking
      If this is enabled batching should be disabled.
      Returns:
      Split messages in chunks if bigger than max allowed size.
      Default:
      false
    • encryptionKey

      String encryptionKey
      Returns:
      Encryption key to add
      Default:
      ""
    • 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 sendBefore
      Defaults 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