Java Code Examples for org.springframework.kafka.listener.ContainerProperties#setMissingTopicsFatal()
The following examples show how to use
org.springframework.kafka.listener.ContainerProperties#setMissingTopicsFatal() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EnodeTestKafkaConfig.java From enode with MIT License | 5 votes |
@Bean public KafkaMessageListenerContainer<String, String> commandListenerContainer(KafkaCommandListener commandListener, ConsumerFactory<String, String> consumerFactory) { ContainerProperties properties = new ContainerProperties(commandTopic); properties.setGroupId(Constants.DEFAULT_CONSUMER_GROUP); properties.setMessageListener(commandListener); properties.setMissingTopicsFatal(false); return new KafkaMessageListenerContainer<>(consumerFactory, properties); }
Example 2
Source File: EnodeTestKafkaConfig.java From enode with MIT License | 5 votes |
@Bean public KafkaMessageListenerContainer<String, String> domainEventListenerContainer(KafkaDomainEventListener domainEventListener, ConsumerFactory<String, String> consumerFactory) { ContainerProperties properties = new ContainerProperties(eventTopic); properties.setGroupId(Constants.DEFAULT_PRODUCER_GROUP); properties.setMessageListener(domainEventListener); properties.setMissingTopicsFatal(false); properties.setAckMode(ContainerProperties.AckMode.MANUAL); return new KafkaMessageListenerContainer<>(consumerFactory, properties); }
Example 3
Source File: EnodeTestKafkaConfig.java From enode with MIT License | 5 votes |
@Bean public KafkaMessageListenerContainer<String, String> applicationMessageListenerContainer(KafkaApplicationMessageListener applicationMessageListener, ConsumerFactory<String, String> consumerFactory) { ContainerProperties properties = new ContainerProperties(applicationTopic); properties.setGroupId(Constants.DEFAULT_PRODUCER_GROUP); properties.setMessageListener(applicationMessageListener); properties.setMissingTopicsFatal(false); properties.setAckMode(ContainerProperties.AckMode.MANUAL); return new KafkaMessageListenerContainer<>(consumerFactory, properties); }
Example 4
Source File: EnodeTestKafkaConfig.java From enode with MIT License | 5 votes |
@Bean public KafkaMessageListenerContainer<String, String> publishableExceptionListenerContainer(KafkaPublishableExceptionListener publishableExceptionListener, ConsumerFactory<String, String> consumerFactory) { ContainerProperties properties = new ContainerProperties(exceptionTopic); properties.setGroupId(Constants.DEFAULT_PRODUCER_GROUP); properties.setMessageListener(publishableExceptionListener); properties.setMissingTopicsFatal(false); properties.setAckMode(ContainerProperties.AckMode.MANUAL); return new KafkaMessageListenerContainer<>(consumerFactory, properties); }
Example 5
Source File: KafkaCommandConfig.java From enode with MIT License | 5 votes |
@Bean public KafkaMessageListenerContainer kafkaMessageListenerContainer(KafkaCommandListener commandListener, RetryTemplate retryTemplate) { ContainerProperties properties = new ContainerProperties(COMMAND_TOPIC); properties.setGroupId(DEFAULT_CONSUMER_GROUP); RetryingMessageListenerAdapter listenerAdapter = new RetryingMessageListenerAdapter(commandListener, retryTemplate); properties.setMessageListener(listenerAdapter); properties.setMissingTopicsFatal(false); properties.setAckMode(ContainerProperties.AckMode.MANUAL); return new KafkaMessageListenerContainer<>(consumerFactory(), properties); }
Example 6
Source File: KafkaEventConfig.java From enode with MIT License | 5 votes |
@Bean public KafkaMessageListenerContainer domainEventListenerContainer(KafkaDomainEventListener domainEventListener, RetryTemplate retryTemplate) { ContainerProperties properties = new ContainerProperties(QueueProperties.EVENT_TOPIC); properties.setGroupId(QueueProperties.DEFAULT_PRODUCER_GROUP); RetryingMessageListenerAdapter listenerAdapter = new RetryingMessageListenerAdapter(domainEventListener, retryTemplate); properties.setMessageListener(listenerAdapter); properties.setMissingTopicsFatal(false); properties.setAckMode(ContainerProperties.AckMode.MANUAL); return new KafkaMessageListenerContainer<>(consumerFactory(), properties); }
Example 7
Source File: KafkaEventConfig.java From enode with MIT License | 5 votes |
@Bean public KafkaMessageListenerContainer applicationMessageListenerContainer(KafkaApplicationMessageListener applicationMessageListener, RetryTemplate retryTemplate) { ContainerProperties properties = new ContainerProperties(QueueProperties.APPLICATION_TOPIC); properties.setGroupId(QueueProperties.DEFAULT_PRODUCER_GROUP); RetryingMessageListenerAdapter listenerAdapter = new RetryingMessageListenerAdapter(applicationMessageListener, retryTemplate); properties.setMessageListener(listenerAdapter); properties.setMissingTopicsFatal(false); properties.setAckMode(ContainerProperties.AckMode.MANUAL); return new KafkaMessageListenerContainer<>(consumerFactory(), properties); }
Example 8
Source File: KafkaEventConfig.java From enode with MIT License | 5 votes |
@Bean public KafkaMessageListenerContainer publishableExceptionListenerContainer(KafkaPublishableExceptionListener publishableExceptionListener, RetryTemplate retryTemplate) { ContainerProperties properties = new ContainerProperties(QueueProperties.EXCEPTION_TOPIC); properties.setGroupId(QueueProperties.DEFAULT_PRODUCER_GROUP); RetryingMessageListenerAdapter listenerAdapter = new RetryingMessageListenerAdapter(publishableExceptionListener, retryTemplate); properties.setMessageListener(listenerAdapter); properties.setMissingTopicsFatal(false); properties.setAckMode(ContainerProperties.AckMode.MANUAL); return new KafkaMessageListenerContainer<>(consumerFactory(), properties); }
Example 9
Source File: EventRegistryKafkaConfiguration.java From flowable-engine with Apache License 2.0 | 5 votes |
@Bean(name = "kafkaListenerContainerFactory") public ConcurrentKafkaListenerContainerFactory<?, ?> kafkaListenerContainerFactory(ConsumerFactory<Object, Object> kafkaConsumerFactory) { ConcurrentKafkaListenerContainerFactory<Object, Object> factory = new ConcurrentKafkaListenerContainerFactory<>(); factory.setConsumerFactory(kafkaConsumerFactory); ContainerProperties containerProperties = factory.getContainerProperties(); containerProperties.setMissingTopicsFatal(true); return factory; }