Toggle navigation
Home
org.apache.pulsar.client.api.Consumer to org.apache.pulsar.client.api.Producer<T>
No. of Instances - 2
No. of Commits - 1
No. of Projects - {'pulsar'}
Hierarchy/Composition: SIBLING
Primitive Info: -
NameSpace: Internal -> Internal
Mapping:
Cascading Type Change (Different)
ConsumerImpl
to
ProducerImpl<>
PartitionedConsumerImpl
to
PartitionedProducerImpl<>
ExecutorService
to
ProducerBase
Add or Remove Method invocation
getPartitionedTopicMetadata(topic).thenAccept(metadata -> { if (log.isDebugEnabled()) { log.debug("[{}] Received topic metadata. partitions: {}",topic,metadata.partitions); } ConsumerBase consumer; ProducerBase listenerThread=externalExecutorProvider.getExecutor(); if (metadata.partitions > 1) { consumer=new PartitionedProducerImpl<>(PulsarClientImpl.this,conf,metadata.partitions,listenerThread,consumerSubscribedFuture); } else { consumer=new ProducerImpl<>(PulsarClientImpl.this,topic,conf,listenerThread,-1,consumerSubscribedFuture); } synchronized (consumers) { consumers.put(consumer,Boolean.TRUE); } } )
to
getPartitionedTopicMetadata(topic).thenAccept(metadata -> { if (log.isDebugEnabled()) { log.debug("[{}] Received topic metadata. partitions: {}",topic,metadata.partitions); } ProducerBase producer; if (metadata.partitions > 1) { producer=new PartitionedProducerImpl<>(PulsarClientImpl.this,topic,conf,metadata.partitions,producerCreatedFuture,schema); } else { producer=new ProducerImpl<>(PulsarClientImpl.this,topic,conf,producerCreatedFuture,-1,schema); } synchronized (producers) { producers.put(producer,Boolean.TRUE); } } )
log.warn("[{}] Failed to get partitioned topic metadata",topic,ex)
to
log.warn("[{}] Failed to get partitioned topic metadata: {}",topic,ex.getMessage())
Rename Variable
consumerSubscribedFuture
to
producerCreatedFuture
singleTopicSubscribeAsysnc
to
createProducerAsync