@Configuration(value="sagaLevel3Config") public class SagaClientConfig extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
appName |
protected String |
appTopic |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected String |
serverTopic
saga-server topic
|
protected org.springframework.kafka.core.KafkaTemplate |
template |
| 构造器和说明 |
|---|
SagaClientConfig() |
@Value(value="${beetlsql-saga.kafka.server-topic:saga-server-topic}")
protected String serverTopic
@Value(value="${beetlsql-saga.kafka.client-topic-prefix}")
protected String appTopic
@Autowired protected org.springframework.kafka.core.KafkaTemplate template
@Value(value="${spring.application.name}")
protected String appName
@Autowired protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
@PostConstruct public void initSaga()
@KafkaListener(topics="#{\'${beetlsql-saga.kafka.client-topic-prefix}\'+\'-\'+\'${spring.application.name}\'}")
public void retry(List<org.apache.kafka.clients.consumer.ConsumerRecord<?,String>> records)
throws Exception
records - ExceptionCopyright © 2021. All rights reserved.