Created
July 31, 2020 14:37
-
-
Save sophea/34e1078a95a5bd199be8058341eefe41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.sma.rabbitmq.service; | |
| import com.sma.rabbitmq.model.Category; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.amqp.rabbit.annotation.RabbitListener; | |
| import org.springframework.stereotype.Component; | |
| /** | |
| * Author: Mak Sophea | |
| * Date: 07/31/2020 | |
| */ | |
| @Component | |
| @Slf4j | |
| public class RabbitMQReceiver { | |
| @RabbitListener(queues = "${backend.rabbitmq.queue}") | |
| public void receivedMessage(Category category) { | |
| log.info("Recieved Message From RabbitMQ: " + category); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment