Last active
May 13, 2021 12:04
-
-
Save sonus21/7c16e0d4d9ce88ae21a218ae5b132596 to your computer and use it in GitHub Desktop.
Message Listener
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
| import com.github.sonus21.rqueue.annotation.RqueueListener; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.stereotype.Component; | |
| @Component | |
| @Slf4j | |
| public class MessageListener { | |
| @RqueueListener(value = "${email.queue.name}") | |
| public void sendEmail(Email email) { | |
| log.info("Email {}", email); | |
| } | |
| @RqueueListener(value = "${invoice.queue.name}") | |
| public void generateInvoice(Invoice invoice) { | |
| log.info("Invoice {}", invoice); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment