mirror of
https://github.com/valitydev/daway.git
synced 2024-11-06 08:35:23 +00:00
The return of the recurrent payment tool (#126)
Co-authored-by: Inal Arsanukaev <inalarsanukaev@MacBook-Pro-Inal.local>
This commit is contained in:
parent
4952e43a24
commit
aab1427c49
@ -50,6 +50,8 @@ public class KafkaConfig {
|
||||
private String bootstrapServers;
|
||||
@Value("${kafka.consumer.invoicing.concurrency}")
|
||||
private int concurrency;
|
||||
@Value("${kafka.consumer.recurrent-payment-tool.concurrency}")
|
||||
private int recPayToolConcurrency;
|
||||
@Value("${kafka.consumer.party-management.concurrency}")
|
||||
private int partyConcurrency;
|
||||
@Value("${retry-policy.maxAttempts}")
|
||||
@ -96,6 +98,12 @@ public class KafkaConfig {
|
||||
return createConcurrentFactory(consumerFactory, concurrency);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public KafkaListenerContainerFactory<ConcurrentMessageListenerContainer<String, MachineEvent>> recPayToolContainerFactory(
|
||||
ConsumerFactory<String, MachineEvent> consumerFactory) {
|
||||
return createConcurrentFactory(consumerFactory, recPayToolConcurrency);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public KafkaListenerContainerFactory<ConcurrentMessageListenerContainer<String, MachineEvent>> partyManagementContainerFactory(
|
||||
KafkaSslProperties kafkaSslProperties) {
|
||||
|
@ -2,8 +2,10 @@ package com.rbkmoney.newway.config;
|
||||
|
||||
import com.rbkmoney.newway.poller.listener.InvoicingKafkaListener;
|
||||
import com.rbkmoney.newway.poller.listener.PartyManagementListener;
|
||||
import com.rbkmoney.newway.poller.listener.RecurrentPaymentToolListener;
|
||||
import com.rbkmoney.newway.service.InvoicingService;
|
||||
import com.rbkmoney.newway.service.PartyManagementService;
|
||||
import com.rbkmoney.newway.service.RecurrentPaymentToolService;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@ -19,6 +21,12 @@ public class KafkaConsumerBeanEnableConfig {
|
||||
return new InvoicingKafkaListener(invoicingService);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "info.single-instance-mode", havingValue = "false")
|
||||
public RecurrentPaymentToolListener recurrentPaymentToolListener(RecurrentPaymentToolService recurrentPaymentToolService) {
|
||||
return new RecurrentPaymentToolListener(recurrentPaymentToolService);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "info.single-instance-mode", havingValue = "false")
|
||||
public PartyManagementListener partyManagementListener(PartyManagementService partyManagementService) {
|
||||
|
Loading…
Reference in New Issue
Block a user