BAEL-427 Examples for topic and fanout exchanges. (#1648)
* BAEL-427 Examples for topic and fanout exchanges. * BAEL-427 Separating code for the new article from the old one
This commit is contained in:
committed by
adamd1985
parent
f674f12eac
commit
709857b9aa
@@ -2,7 +2,7 @@ package com.baeldung.springamqpsimple;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@@ -10,6 +10,7 @@ public class MessageConsumer {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(MessageConsumer.class);
|
||||
|
||||
@RabbitListener(queues = {SpringAmqpConfig.queueName})
|
||||
public void receiveMessage(String message) {
|
||||
logger.info("Received Message: " + message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user