All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.majusko.pulsar2.solon.Pulsar2ConsumerConfiguration Maven / Gradle / Ivy

There is a newer version: 3.0.0-M4
Show newest version
package io.github.majusko.pulsar2.solon;

import org.apache.pulsar.client.api.ConsumerInterceptor;
import org.apache.pulsar.client.api.PulsarClient;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Condition;
import org.noear.solon.annotation.Configuration;

import io.github.majusko.pulsar2.solon.consumer.ConsumerAggregator;
import io.github.majusko.pulsar2.solon.consumer.DefaultConsumerInterceptor;
import io.github.majusko.pulsar2.solon.properties.ConsumerProperties;
import io.github.majusko.pulsar2.solon.properties.PulsarProperties;

@Configuration
public class Pulsar2ConsumerConfiguration {

    @Bean
    @Condition(onMissingBean = ConsumerInterceptor.class)
    public ConsumerInterceptor consumerInterceptor(){
        return new DefaultConsumerInterceptor();
    }
	
//	@Bean
//	@Condition(onMissingBean = ConsumerAggregator.class)
//	ConsumerAggregator getConsumerAggregator(PulsarClient pulsarClient,
//            ConsumerProperties consumerProperties, PulsarProperties pulsarProperties, 
//            ConsumerInterceptor consumerInterceptor) {
//		ConsumerAggregator ca = new ConsumerAggregator(pulsarClient,consumerProperties,pulsarProperties,consumerInterceptor);
//		return ca;
//	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy