Skip to content

Instantly share code, notes, and snippets.

@sonus21
Last active May 13, 2021 12:04
Show Gist options
  • Select an option

  • Save sonus21/7c16e0d4d9ce88ae21a218ae5b132596 to your computer and use it in GitHub Desktop.

Select an option

Save sonus21/7c16e0d4d9ce88ae21a218ae5b132596 to your computer and use it in GitHub Desktop.
Message Listener
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