diff spring-jms-playground/src/main/java/de/comline/jms/receiver/QueueReceiver.java @ 15:ad77abd85976

playground for spring boot JMS handling
author Dirk Olmes <dirk.olmes@codedo.de>
date Thu, 10 Sep 2020 08:44:20 +0200
parents
children 4217059d40e8
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spring-jms-playground/src/main/java/de/comline/jms/receiver/QueueReceiver.java	Thu Sep 10 08:44:20 2020 +0200
@@ -0,0 +1,16 @@
+package de.comline.jms.receiver;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.stereotype.Component;
+
+@Component
+public class QueueReceiver {
+	private static final Logger LOG = LoggerFactory.getLogger(QueueReceiver.class);
+
+	@JmsListener(destination = "input-queue", containerFactory = "amqFactory")
+	public void receive(String message) {
+		LOG.info("received {}", message);
+	}
+}