kafka消费者添加监听ID
This commit is contained in:
parent
87c43ee40b
commit
8fcdfa6d87
@ -64,7 +64,7 @@ public class KafKaPublishConsumer implements ApplicationEventPublisherAware {
|
|||||||
public KafKaPublishConsumer() {
|
public KafKaPublishConsumer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@KafkaListener(topics = {"C0021"})
|
@KafkaListener(id="UserCenter1", topics = "C0021")
|
||||||
public void gridRelation(ConsumerRecord<?, ?> record) {
|
public void gridRelation(ConsumerRecord<?, ?> record) {
|
||||||
String recordValue = record.value().toString();
|
String recordValue = record.value().toString();
|
||||||
LOG.debug("Grid Relation(C0021) recordValue: {}", recordValue);
|
LOG.debug("Grid Relation(C0021) recordValue: {}", recordValue);
|
||||||
@ -94,7 +94,7 @@ public class KafKaPublishConsumer implements ApplicationEventPublisherAware {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@KafkaListener(topics = {"C0022"})
|
@KafkaListener(id="UserCenter1", topics = "C0022")
|
||||||
public void mapGrid(ConsumerRecord<?, ?> record) {
|
public void mapGrid(ConsumerRecord<?, ?> record) {
|
||||||
String recordValue = record.value().toString();
|
String recordValue = record.value().toString();
|
||||||
LOG.debug("Grid(C0022) recordValue: {}", recordValue);
|
LOG.debug("Grid(C0022) recordValue: {}", recordValue);
|
||||||
@ -133,7 +133,7 @@ public class KafKaPublishConsumer implements ApplicationEventPublisherAware {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@KafkaListener(topics = {"C0023"})
|
@KafkaListener(id="UserCenter1", topics = "C0023")
|
||||||
public void mapGridPoint(ConsumerRecord<?, ?> record) {
|
public void mapGridPoint(ConsumerRecord<?, ?> record) {
|
||||||
String recordValue = record.value().toString();
|
String recordValue = record.value().toString();
|
||||||
LOG.debug("Grid Point(C0023) recordValue: {}", recordValue);
|
LOG.debug("Grid Point(C0023) recordValue: {}", recordValue);
|
||||||
|
Loading…
Reference in New Issue
Block a user