|
@@ -24,12 +24,12 @@ import org.springframework.stereotype.Component;
|
|
|
*/
|
|
*/
|
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
-@Component
|
|
|
|
|
|
|
+//@Component
|
|
|
@ConditionalOnExpression("'local'.equals('${locationFlag}')")
|
|
@ConditionalOnExpression("'local'.equals('${locationFlag}')")
|
|
|
public class SyncKafkaConsumer {
|
|
public class SyncKafkaConsumer {
|
|
|
private final EventStrategyContext eventStrategyContext;
|
|
private final EventStrategyContext eventStrategyContext;
|
|
|
|
|
|
|
|
- @KafkaListener(topics = "eventBus", groupId = "test-group-id")
|
|
|
|
|
|
|
+ //@KafkaListener(topics = "eventBus", groupId = "test-group-id")
|
|
|
public void kafkaReceiveHandler(ConsumerRecord<String, String> record) {
|
|
public void kafkaReceiveHandler(ConsumerRecord<String, String> record) {
|
|
|
KafkaMessage<?> receiveMsg = JSONUtil.toBean(record.value(), KafkaMessage.class);
|
|
KafkaMessage<?> receiveMsg = JSONUtil.toBean(record.value(), KafkaMessage.class);
|
|
|
String eventType = receiveMsg.getHeader().getEventType();
|
|
String eventType = receiveMsg.getHeader().getEventType();
|