Annotation Interface KafkaClient
An introduction advice that automatically implements interfaces and abstract classes and creates
KafkaProducer
instances.- Since:
- 1.0
- Author:
- Graeme Rocher
- See Also:
-
KafkaClientIntroductionAdvice
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Constants for theack
setting for the client, which impacts message delivery durability. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionint
boolean
By default when specifying an array or List the object will be serializes to a JSON array.The executor to use to enable non-blocking producer methods.The maximum duration to block synchronous send operations.io.micronaut.context.annotation.Property[]
Additional properties to configure with for Consumer.boolean
Whether to include timestamps in outgoing messages.The TransactionalId to use for transactional delivery.Same asid()
.
-
Element Details
-
value
Same asid()
.- Returns:
- The id of the client
- Default:
- ""
-
id
- Returns:
- The id of the client
- Default:
- ""
-
transactionalId
String transactionalIdThe TransactionalId to use for transactional delivery. This enables reliability semantics which span multiple producer sessions since it allows the client to guarantee that transactions using the same TransactionalId have been completed prior to starting any new transactions. If no TransactionalId is provided, then the producer is limited to idempotent delivery. If a TransactionalId is configured,enable.idempotence
is implied. By default, the TransactionId is not configured, which means transactions cannot be used.- Returns:
- true to enable transaction
- Default:
- ""
-
maxBlock
String maxBlockThe maximum duration to block synchronous send operations.- Returns:
- The timeout
- Default:
- ""
-
timestamp
boolean timestampWhether to include timestamps in outgoing messages.- Returns:
- True if time stamps should be included. Defaults to false.
- Default:
- false
-
batch
boolean batchBy default when specifying an array or List the object will be serializes to a JSON array. By specifyingtrue
this will instead send each record in the the array or list as an individualProducerRecord
.- Returns:
- Whether to receive a batch of records or not
- Default:
- false
-
properties
io.micronaut.context.annotation.Property[] propertiesAdditional properties to configure with for Consumer.- Returns:
- The properties
- Default:
- {}
-
acks
int acks- Returns:
- The
ack
setting for the client, which impacts message delivery durability. - See Also:
- Default:
- -2147483648
-
executor
String executorThe executor to use to enable non-blocking producer methods.- Returns:
- The name of the executor to use
- Default:
- ""
-