/**
* Represents kafka config.
*/
@Data
@Configuration
@EnableKafka
@ConfigurationProperties(prefix = "kafka", ignoreUnknownFields = false)
@ConditionalOnProperty(name = "deploy.enabled-kafka", havingValue = "true")
public class KafkaConfig {
private String bootstrapServers;
private int intervalMs;
private String groupId;
private int fetchMaxBytes;
private int concurrency;
private int maxRequestSize;
/**
* Constructs the kafka listener container factory.
*
* @return Kafka listener container factory.
*/
@Bean
public KafkaListenerContainerFactory<ConcurrentMessageListenerContainer<String, RetailFaceTrack>> kafkaListenerContainerFactory() {
ConcurrentKafkaListenerContainerFactory<Str
spring kafka 使用案例
最新推荐文章于 2024-06-02 19:29:15 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)