Search in sources :

Example 1 with PulsarSinkProcessorBase

use of org.apache.pulsar.functions.sink.PulsarSink.PulsarSinkProcessorBase in project pulsar by yahoo.

the class PulsarSinkTest method testWriteGenericRecords.

private void testWriteGenericRecords(ProcessingGuarantees guarantees) throws Exception {
    String defaultTopic = "default";
    PulsarSinkConfig sinkConfig = getPulsarConfigs();
    sinkConfig.setTopic(defaultTopic);
    sinkConfig.setTypeClassName(GenericRecord.class.getName());
    sinkConfig.setProcessingGuarantees(guarantees);
    PulsarClient client = getPulsarClient();
    PulsarSink pulsarSink = new PulsarSink(client, sinkConfig, new HashMap<>(), mock(ComponentStatsManager.class), Thread.currentThread().getContextClassLoader());
    pulsarSink.open(new HashMap<>(), mock(SinkContext.class));
    if (ProcessingGuarantees.ATMOST_ONCE == guarantees) {
        assertTrue(pulsarSink.pulsarSinkProcessor instanceof PulsarSink.PulsarSinkAtMostOnceProcessor);
    } else if (ProcessingGuarantees.ATLEAST_ONCE == guarantees) {
        assertTrue(pulsarSink.pulsarSinkProcessor instanceof PulsarSink.PulsarSinkAtLeastOnceProcessor);
    } else {
        assertTrue(pulsarSink.pulsarSinkProcessor instanceof PulsarSink.PulsarSinkEffectivelyOnceProcessor);
    }
    PulsarSinkProcessorBase processor = (PulsarSinkProcessorBase) pulsarSink.pulsarSinkProcessor;
    assertFalse(processor.publishProducers.containsKey(defaultTopic));
    String[] topics = { "topic-1", "topic-2", "topic-3" };
    for (String topic : topics) {
        RecordSchemaBuilder builder = SchemaBuilder.record("MyRecord");
        builder.field("number").type(SchemaType.INT32);
        builder.field("text").type(SchemaType.STRING);
        GenericSchema<GenericRecord> schema = Schema.generic(builder.build(SchemaType.AVRO));
        GenericRecordBuilder recordBuilder = schema.newRecordBuilder();
        recordBuilder.set("number", 1);
        recordBuilder.set("text", topic);
        GenericRecord genericRecord = recordBuilder.build();
        SinkRecord<GenericRecord> record = new SinkRecord<>(new Record<GenericRecord>() {

            @Override
            public Optional<String> getDestinationTopic() {
                return Optional.of(topic);
            }

            @Override
            public Schema<GenericRecord> getSchema() {
                return schema;
            }

            @Override
            public GenericRecord getValue() {
                return genericRecord;
            }

            @Override
            public Optional<String> getPartitionId() {
                return Optional.of(topic + "-id-1");
            }

            @Override
            public Optional<Long> getRecordSequence() {
                return Optional.of(1L);
            }
        }, genericRecord);
        pulsarSink.write(record);
        if (ProcessingGuarantees.EFFECTIVELY_ONCE == guarantees) {
            assertTrue(processor.publishProducers.containsKey(String.format("%s-%s-id-1", topic, topic)));
        } else {
            assertTrue(processor.publishProducers.containsKey(topic));
        }
        verify(client.newProducer(), times(1)).topic(argThat(otherTopic -> topic != null ? topic.equals(otherTopic) : defaultTopic.equals(otherTopic)));
        verify(client, times(1)).newProducer(argThat(otherSchema -> Objects.equals(otherSchema, schema)));
    }
}
Also used : PulsarClientImpl(org.apache.pulsar.client.impl.PulsarClientImpl) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) Producer(org.apache.pulsar.client.api.Producer) Test(org.testng.annotations.Test) FunctionConfig(org.apache.pulsar.common.functions.FunctionConfig) Mockito.doReturn(org.mockito.Mockito.doReturn) Assert.assertFalse(org.testng.Assert.assertFalse) PulsarClientException(org.apache.pulsar.client.api.PulsarClientException) TopicSchema(org.apache.pulsar.functions.source.TopicSchema) Record(org.apache.pulsar.functions.api.Record) BeforeMethod(org.testng.annotations.BeforeMethod) ArgumentMatchers.anyList(org.mockito.ArgumentMatchers.anyList) ComponentStatsManager(org.apache.pulsar.functions.instance.stats.ComponentStatsManager) Objects(java.util.Objects) Consumer(org.apache.pulsar.client.api.Consumer) RecordSchemaBuilder(org.apache.pulsar.client.api.schema.RecordSchemaBuilder) Slf4j(lombok.extern.slf4j.Slf4j) SerDe(org.apache.pulsar.functions.api.SerDe) Optional(java.util.Optional) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Setter(lombok.Setter) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) Assert.assertNull(org.testng.Assert.assertNull) Getter(lombok.Getter) SinkRecord(org.apache.pulsar.functions.instance.SinkRecord) Assert.assertEquals(org.testng.Assert.assertEquals) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) ConsumerBuilder(org.apache.pulsar.client.api.ConsumerBuilder) ArgumentMatchers.anyBoolean(org.mockito.ArgumentMatchers.anyBoolean) SchemaType(org.apache.pulsar.common.schema.SchemaType) ProducerBuilder(org.apache.pulsar.client.api.ProducerBuilder) PulsarSinkProcessorBase(org.apache.pulsar.functions.sink.PulsarSink.PulsarSinkProcessorBase) Assert(org.testng.Assert) PulsarClient(org.apache.pulsar.client.api.PulsarClient) ArgumentMatchers.anyInt(org.mockito.ArgumentMatchers.anyInt) TypedMessageBuilder(org.apache.pulsar.client.api.TypedMessageBuilder) ProcessingGuarantees(org.apache.pulsar.common.functions.FunctionConfig.ProcessingGuarantees) GenericSchema(org.apache.pulsar.client.api.schema.GenericSchema) GenericRecordBuilder(org.apache.pulsar.client.api.schema.GenericRecordBuilder) Assert.fail(org.testng.Assert.fail) Mockito.times(org.mockito.Mockito.times) IOException(java.io.IOException) Mockito.verify(org.mockito.Mockito.verify) Schema(org.apache.pulsar.client.api.Schema) GenericRecord(org.apache.pulsar.client.api.schema.GenericRecord) AutoConsumeSchema(org.apache.pulsar.client.impl.schema.AutoConsumeSchema) MessageId(org.apache.pulsar.client.api.MessageId) SinkContext(org.apache.pulsar.io.core.SinkContext) Assert.assertTrue(org.testng.Assert.assertTrue) SchemaBuilder(org.apache.pulsar.client.api.schema.SchemaBuilder) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) RecordSchemaBuilder(org.apache.pulsar.client.api.schema.RecordSchemaBuilder) Optional(java.util.Optional) SinkContext(org.apache.pulsar.io.core.SinkContext) TopicSchema(org.apache.pulsar.functions.source.TopicSchema) GenericSchema(org.apache.pulsar.client.api.schema.GenericSchema) Schema(org.apache.pulsar.client.api.Schema) AutoConsumeSchema(org.apache.pulsar.client.impl.schema.AutoConsumeSchema) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) SinkRecord(org.apache.pulsar.functions.instance.SinkRecord) PulsarSinkProcessorBase(org.apache.pulsar.functions.sink.PulsarSink.PulsarSinkProcessorBase) ComponentStatsManager(org.apache.pulsar.functions.instance.stats.ComponentStatsManager) GenericRecordBuilder(org.apache.pulsar.client.api.schema.GenericRecordBuilder) PulsarClient(org.apache.pulsar.client.api.PulsarClient) GenericRecord(org.apache.pulsar.client.api.schema.GenericRecord)

Example 2 with PulsarSinkProcessorBase

use of org.apache.pulsar.functions.sink.PulsarSink.PulsarSinkProcessorBase in project incubator-pulsar by apache.

the class PulsarSinkTest method testWriteGenericRecords.

private void testWriteGenericRecords(ProcessingGuarantees guarantees) throws Exception {
    String defaultTopic = "default";
    PulsarSinkConfig sinkConfig = getPulsarConfigs();
    sinkConfig.setTopic(defaultTopic);
    sinkConfig.setTypeClassName(GenericRecord.class.getName());
    sinkConfig.setProcessingGuarantees(guarantees);
    PulsarClient client = getPulsarClient();
    PulsarSink pulsarSink = new PulsarSink(client, sinkConfig, new HashMap<>(), mock(ComponentStatsManager.class), Thread.currentThread().getContextClassLoader());
    pulsarSink.open(new HashMap<>(), mock(SinkContext.class));
    if (ProcessingGuarantees.ATMOST_ONCE == guarantees) {
        assertTrue(pulsarSink.pulsarSinkProcessor instanceof PulsarSink.PulsarSinkAtMostOnceProcessor);
    } else if (ProcessingGuarantees.ATLEAST_ONCE == guarantees) {
        assertTrue(pulsarSink.pulsarSinkProcessor instanceof PulsarSink.PulsarSinkAtLeastOnceProcessor);
    } else {
        assertTrue(pulsarSink.pulsarSinkProcessor instanceof PulsarSink.PulsarSinkEffectivelyOnceProcessor);
    }
    PulsarSinkProcessorBase processor = (PulsarSinkProcessorBase) pulsarSink.pulsarSinkProcessor;
    assertFalse(processor.publishProducers.containsKey(defaultTopic));
    String[] topics = { "topic-1", "topic-2", "topic-3" };
    for (String topic : topics) {
        RecordSchemaBuilder builder = SchemaBuilder.record("MyRecord");
        builder.field("number").type(SchemaType.INT32);
        builder.field("text").type(SchemaType.STRING);
        GenericSchema<GenericRecord> schema = Schema.generic(builder.build(SchemaType.AVRO));
        GenericRecordBuilder recordBuilder = schema.newRecordBuilder();
        recordBuilder.set("number", 1);
        recordBuilder.set("text", topic);
        GenericRecord genericRecord = recordBuilder.build();
        SinkRecord<GenericRecord> record = new SinkRecord<>(new Record<GenericRecord>() {

            @Override
            public Optional<String> getDestinationTopic() {
                return Optional.of(topic);
            }

            @Override
            public Schema<GenericRecord> getSchema() {
                return schema;
            }

            @Override
            public GenericRecord getValue() {
                return genericRecord;
            }

            @Override
            public Optional<String> getPartitionId() {
                return Optional.of(topic + "-id-1");
            }

            @Override
            public Optional<Long> getRecordSequence() {
                return Optional.of(1L);
            }
        }, genericRecord);
        pulsarSink.write(record);
        if (ProcessingGuarantees.EFFECTIVELY_ONCE == guarantees) {
            assertTrue(processor.publishProducers.containsKey(String.format("%s-%s-id-1", topic, topic)));
        } else {
            assertTrue(processor.publishProducers.containsKey(topic));
        }
        verify(client.newProducer(), times(1)).topic(argThat(otherTopic -> topic != null ? topic.equals(otherTopic) : defaultTopic.equals(otherTopic)));
        verify(client, times(1)).newProducer(argThat(otherSchema -> Objects.equals(otherSchema, schema)));
    }
}
Also used : PulsarClientImpl(org.apache.pulsar.client.impl.PulsarClientImpl) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) Producer(org.apache.pulsar.client.api.Producer) Test(org.testng.annotations.Test) FunctionConfig(org.apache.pulsar.common.functions.FunctionConfig) Mockito.doReturn(org.mockito.Mockito.doReturn) Assert.assertFalse(org.testng.Assert.assertFalse) PulsarClientException(org.apache.pulsar.client.api.PulsarClientException) TopicSchema(org.apache.pulsar.functions.source.TopicSchema) Record(org.apache.pulsar.functions.api.Record) BeforeMethod(org.testng.annotations.BeforeMethod) ArgumentMatchers.anyList(org.mockito.ArgumentMatchers.anyList) ComponentStatsManager(org.apache.pulsar.functions.instance.stats.ComponentStatsManager) Objects(java.util.Objects) Consumer(org.apache.pulsar.client.api.Consumer) RecordSchemaBuilder(org.apache.pulsar.client.api.schema.RecordSchemaBuilder) Slf4j(lombok.extern.slf4j.Slf4j) SerDe(org.apache.pulsar.functions.api.SerDe) Optional(java.util.Optional) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Setter(lombok.Setter) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) Assert.assertNull(org.testng.Assert.assertNull) Getter(lombok.Getter) SinkRecord(org.apache.pulsar.functions.instance.SinkRecord) Assert.assertEquals(org.testng.Assert.assertEquals) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) ConsumerBuilder(org.apache.pulsar.client.api.ConsumerBuilder) ArgumentMatchers.anyBoolean(org.mockito.ArgumentMatchers.anyBoolean) SchemaType(org.apache.pulsar.common.schema.SchemaType) ProducerBuilder(org.apache.pulsar.client.api.ProducerBuilder) PulsarSinkProcessorBase(org.apache.pulsar.functions.sink.PulsarSink.PulsarSinkProcessorBase) Assert(org.testng.Assert) PulsarClient(org.apache.pulsar.client.api.PulsarClient) ArgumentMatchers.anyInt(org.mockito.ArgumentMatchers.anyInt) TypedMessageBuilder(org.apache.pulsar.client.api.TypedMessageBuilder) ProcessingGuarantees(org.apache.pulsar.common.functions.FunctionConfig.ProcessingGuarantees) GenericSchema(org.apache.pulsar.client.api.schema.GenericSchema) GenericRecordBuilder(org.apache.pulsar.client.api.schema.GenericRecordBuilder) Assert.fail(org.testng.Assert.fail) Mockito.times(org.mockito.Mockito.times) IOException(java.io.IOException) Mockito.verify(org.mockito.Mockito.verify) Schema(org.apache.pulsar.client.api.Schema) GenericRecord(org.apache.pulsar.client.api.schema.GenericRecord) AutoConsumeSchema(org.apache.pulsar.client.impl.schema.AutoConsumeSchema) MessageId(org.apache.pulsar.client.api.MessageId) SinkContext(org.apache.pulsar.io.core.SinkContext) Assert.assertTrue(org.testng.Assert.assertTrue) SchemaBuilder(org.apache.pulsar.client.api.schema.SchemaBuilder) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) RecordSchemaBuilder(org.apache.pulsar.client.api.schema.RecordSchemaBuilder) Optional(java.util.Optional) SinkContext(org.apache.pulsar.io.core.SinkContext) TopicSchema(org.apache.pulsar.functions.source.TopicSchema) GenericSchema(org.apache.pulsar.client.api.schema.GenericSchema) Schema(org.apache.pulsar.client.api.Schema) AutoConsumeSchema(org.apache.pulsar.client.impl.schema.AutoConsumeSchema) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) SinkRecord(org.apache.pulsar.functions.instance.SinkRecord) PulsarSinkProcessorBase(org.apache.pulsar.functions.sink.PulsarSink.PulsarSinkProcessorBase) ComponentStatsManager(org.apache.pulsar.functions.instance.stats.ComponentStatsManager) GenericRecordBuilder(org.apache.pulsar.client.api.schema.GenericRecordBuilder) PulsarClient(org.apache.pulsar.client.api.PulsarClient) GenericRecord(org.apache.pulsar.client.api.schema.GenericRecord)

Example 3 with PulsarSinkProcessorBase

use of org.apache.pulsar.functions.sink.PulsarSink.PulsarSinkProcessorBase in project pulsar by apache.

the class PulsarSinkTest method testWriteGenericRecords.

private void testWriteGenericRecords(ProcessingGuarantees guarantees) throws Exception {
    String defaultTopic = "default";
    PulsarSinkConfig sinkConfig = getPulsarConfigs();
    sinkConfig.setTopic(defaultTopic);
    sinkConfig.setTypeClassName(GenericRecord.class.getName());
    sinkConfig.setProcessingGuarantees(guarantees);
    PulsarClient client = getPulsarClient();
    PulsarSink pulsarSink = new PulsarSink(client, sinkConfig, new HashMap<>(), mock(ComponentStatsManager.class), Thread.currentThread().getContextClassLoader());
    pulsarSink.open(new HashMap<>(), mock(SinkContext.class));
    if (ProcessingGuarantees.ATMOST_ONCE == guarantees) {
        assertTrue(pulsarSink.pulsarSinkProcessor instanceof PulsarSink.PulsarSinkAtMostOnceProcessor);
    } else if (ProcessingGuarantees.ATLEAST_ONCE == guarantees) {
        assertTrue(pulsarSink.pulsarSinkProcessor instanceof PulsarSink.PulsarSinkAtLeastOnceProcessor);
    } else {
        assertTrue(pulsarSink.pulsarSinkProcessor instanceof PulsarSink.PulsarSinkEffectivelyOnceProcessor);
    }
    PulsarSinkProcessorBase processor = (PulsarSinkProcessorBase) pulsarSink.pulsarSinkProcessor;
    assertFalse(processor.publishProducers.containsKey(defaultTopic));
    String[] topics = { "topic-1", "topic-2", "topic-3" };
    for (String topic : topics) {
        RecordSchemaBuilder builder = SchemaBuilder.record("MyRecord");
        builder.field("number").type(SchemaType.INT32);
        builder.field("text").type(SchemaType.STRING);
        GenericSchema<GenericRecord> schema = Schema.generic(builder.build(SchemaType.AVRO));
        GenericRecordBuilder recordBuilder = schema.newRecordBuilder();
        recordBuilder.set("number", 1);
        recordBuilder.set("text", topic);
        GenericRecord genericRecord = recordBuilder.build();
        SinkRecord<GenericRecord> record = new SinkRecord<>(new Record<GenericRecord>() {

            @Override
            public Optional<String> getDestinationTopic() {
                return Optional.of(topic);
            }

            @Override
            public Schema<GenericRecord> getSchema() {
                return schema;
            }

            @Override
            public GenericRecord getValue() {
                return genericRecord;
            }

            @Override
            public Optional<String> getPartitionId() {
                return Optional.of(topic + "-id-1");
            }

            @Override
            public Optional<Long> getRecordSequence() {
                return Optional.of(1L);
            }
        }, genericRecord);
        pulsarSink.write(record);
        if (ProcessingGuarantees.EFFECTIVELY_ONCE == guarantees) {
            assertTrue(processor.publishProducers.containsKey(String.format("%s-%s-id-1", topic, topic)));
        } else {
            assertTrue(processor.publishProducers.containsKey(topic));
        }
        verify(client.newProducer(), times(1)).topic(argThat(otherTopic -> topic != null ? topic.equals(otherTopic) : defaultTopic.equals(otherTopic)));
        verify(client, times(1)).newProducer(argThat(otherSchema -> Objects.equals(otherSchema, schema)));
    }
}
Also used : PulsarClientImpl(org.apache.pulsar.client.impl.PulsarClientImpl) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) Producer(org.apache.pulsar.client.api.Producer) Test(org.testng.annotations.Test) FunctionConfig(org.apache.pulsar.common.functions.FunctionConfig) Mockito.doReturn(org.mockito.Mockito.doReturn) Assert.assertFalse(org.testng.Assert.assertFalse) PulsarClientException(org.apache.pulsar.client.api.PulsarClientException) TopicSchema(org.apache.pulsar.functions.source.TopicSchema) Record(org.apache.pulsar.functions.api.Record) BeforeMethod(org.testng.annotations.BeforeMethod) ArgumentMatchers.anyList(org.mockito.ArgumentMatchers.anyList) ComponentStatsManager(org.apache.pulsar.functions.instance.stats.ComponentStatsManager) Objects(java.util.Objects) Consumer(org.apache.pulsar.client.api.Consumer) RecordSchemaBuilder(org.apache.pulsar.client.api.schema.RecordSchemaBuilder) Slf4j(lombok.extern.slf4j.Slf4j) SerDe(org.apache.pulsar.functions.api.SerDe) Optional(java.util.Optional) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Setter(lombok.Setter) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) Assert.assertNull(org.testng.Assert.assertNull) Getter(lombok.Getter) SinkRecord(org.apache.pulsar.functions.instance.SinkRecord) Assert.assertEquals(org.testng.Assert.assertEquals) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) ConsumerBuilder(org.apache.pulsar.client.api.ConsumerBuilder) ArgumentMatchers.anyBoolean(org.mockito.ArgumentMatchers.anyBoolean) SchemaType(org.apache.pulsar.common.schema.SchemaType) ProducerBuilder(org.apache.pulsar.client.api.ProducerBuilder) PulsarSinkProcessorBase(org.apache.pulsar.functions.sink.PulsarSink.PulsarSinkProcessorBase) Assert(org.testng.Assert) PulsarClient(org.apache.pulsar.client.api.PulsarClient) ArgumentMatchers.anyInt(org.mockito.ArgumentMatchers.anyInt) TypedMessageBuilder(org.apache.pulsar.client.api.TypedMessageBuilder) ProcessingGuarantees(org.apache.pulsar.common.functions.FunctionConfig.ProcessingGuarantees) GenericSchema(org.apache.pulsar.client.api.schema.GenericSchema) GenericRecordBuilder(org.apache.pulsar.client.api.schema.GenericRecordBuilder) Assert.fail(org.testng.Assert.fail) Mockito.times(org.mockito.Mockito.times) IOException(java.io.IOException) Mockito.verify(org.mockito.Mockito.verify) Schema(org.apache.pulsar.client.api.Schema) GenericRecord(org.apache.pulsar.client.api.schema.GenericRecord) AutoConsumeSchema(org.apache.pulsar.client.impl.schema.AutoConsumeSchema) MessageId(org.apache.pulsar.client.api.MessageId) SinkContext(org.apache.pulsar.io.core.SinkContext) Assert.assertTrue(org.testng.Assert.assertTrue) SchemaBuilder(org.apache.pulsar.client.api.schema.SchemaBuilder) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) RecordSchemaBuilder(org.apache.pulsar.client.api.schema.RecordSchemaBuilder) Optional(java.util.Optional) SinkContext(org.apache.pulsar.io.core.SinkContext) TopicSchema(org.apache.pulsar.functions.source.TopicSchema) GenericSchema(org.apache.pulsar.client.api.schema.GenericSchema) Schema(org.apache.pulsar.client.api.Schema) AutoConsumeSchema(org.apache.pulsar.client.impl.schema.AutoConsumeSchema) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) SinkRecord(org.apache.pulsar.functions.instance.SinkRecord) PulsarSinkProcessorBase(org.apache.pulsar.functions.sink.PulsarSink.PulsarSinkProcessorBase) ComponentStatsManager(org.apache.pulsar.functions.instance.stats.ComponentStatsManager) GenericRecordBuilder(org.apache.pulsar.client.api.schema.GenericRecordBuilder) PulsarClient(org.apache.pulsar.client.api.PulsarClient) GenericRecord(org.apache.pulsar.client.api.schema.GenericRecord)

Aggregations

IOException (java.io.IOException)3 HashMap (java.util.HashMap)3 Objects (java.util.Objects)3 Optional (java.util.Optional)3 CompletableFuture (java.util.concurrent.CompletableFuture)3 Getter (lombok.Getter)3 Setter (lombok.Setter)3 Slf4j (lombok.extern.slf4j.Slf4j)3 Consumer (org.apache.pulsar.client.api.Consumer)3 ConsumerBuilder (org.apache.pulsar.client.api.ConsumerBuilder)3 MessageId (org.apache.pulsar.client.api.MessageId)3 Producer (org.apache.pulsar.client.api.Producer)3 ProducerBuilder (org.apache.pulsar.client.api.ProducerBuilder)3 PulsarClient (org.apache.pulsar.client.api.PulsarClient)3 PulsarClientException (org.apache.pulsar.client.api.PulsarClientException)3 Schema (org.apache.pulsar.client.api.Schema)3 TypedMessageBuilder (org.apache.pulsar.client.api.TypedMessageBuilder)3 GenericRecord (org.apache.pulsar.client.api.schema.GenericRecord)3 GenericRecordBuilder (org.apache.pulsar.client.api.schema.GenericRecordBuilder)3 GenericSchema (org.apache.pulsar.client.api.schema.GenericSchema)3