Package io.micronaut.pulsar
Class PulsarProducerFactory
java.lang.Object
io.micronaut.pulsar.PulsarProducerFactory
Pulsar
Producer
factory.- Since:
- 1.0
- Author:
- Haris Secic
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> org.apache.pulsar.client.api.Producer<T>
createProducer
(org.apache.pulsar.client.api.PulsarClient pulsarClient, io.micronaut.core.annotation.AnnotationValue<PulsarProducer> annotationValue, io.micronaut.core.type.Argument<?>[] methodArguments, DefaultSchemaHandler simpleSchemaResolver, String annotatedMethodName) Simple factory method for producing PulsarProducer
beans.
-
Constructor Details
-
PulsarProducerFactory
-
-
Method Details
-
createProducer
@Prototype public <T> org.apache.pulsar.client.api.Producer<T> createProducer(@Parameter org.apache.pulsar.client.api.PulsarClient pulsarClient, @Parameter io.micronaut.core.annotation.AnnotationValue<PulsarProducer> annotationValue, @Parameter io.micronaut.core.type.Argument<?>[] methodArguments, @Parameter DefaultSchemaHandler simpleSchemaResolver, @Parameter String annotatedMethodName) throws io.micronaut.messaging.exceptions.MessagingClientException Simple factory method for producing PulsarProducer
beans.- Type Parameters:
T
- type of message body for pulsar producer- Parameters:
pulsarClient
- main Pulsar Client beanannotationValue
- method annotation to read properties frommethodArguments
- arguments passed to method annotated with @PulsarProducersimpleSchemaResolver
- schema resolver beanannotatedMethodName
- method name on which annotation for Pulsar Producer was set- Returns:
- new Pulsar producer
- Throws:
io.micronaut.messaging.exceptions.MessagingClientException
-