annotate spring-jms-playground/src/main/java/de/comline/jms/receiver/QueueReceiver.java @ 16:4217059d40e8

Test zum Empfang einer ganzen JMS Message, nicht nur der Payload
author Dirk Olmes <dirk.olmes@codedo.de>
date Thu, 10 Sep 2020 09:32:21 +0200
parents ad77abd85976
children a9675808f1dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
1 package de.comline.jms.receiver;
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
2
16
4217059d40e8 Test zum Empfang einer ganzen JMS Message, nicht nur der Payload
Dirk Olmes <dirk.olmes@codedo.de>
parents: 15
diff changeset
3 import javax.jms.TextMessage;
4217059d40e8 Test zum Empfang einer ganzen JMS Message, nicht nur der Payload
Dirk Olmes <dirk.olmes@codedo.de>
parents: 15
diff changeset
4
15
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
5 import org.slf4j.Logger;
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
6 import org.slf4j.LoggerFactory;
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
7 import org.springframework.jms.annotation.JmsListener;
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
8 import org.springframework.stereotype.Component;
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
9
16
4217059d40e8 Test zum Empfang einer ganzen JMS Message, nicht nur der Payload
Dirk Olmes <dirk.olmes@codedo.de>
parents: 15
diff changeset
10 import de.comline.jms.application.Application;
4217059d40e8 Test zum Empfang einer ganzen JMS Message, nicht nur der Payload
Dirk Olmes <dirk.olmes@codedo.de>
parents: 15
diff changeset
11
15
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
12 @Component
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
13 public class QueueReceiver {
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
14 private static final Logger LOG = LoggerFactory.getLogger(QueueReceiver.class);
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
15
16
4217059d40e8 Test zum Empfang einer ganzen JMS Message, nicht nur der Payload
Dirk Olmes <dirk.olmes@codedo.de>
parents: 15
diff changeset
16 @JmsListener(destination = "input-queue", containerFactory = Application.AMQ_FACTORY_BEAN)
15
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
17 public void receive(String message) {
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
18 LOG.info("received {}", message);
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
19 }
16
4217059d40e8 Test zum Empfang einer ganzen JMS Message, nicht nur der Payload
Dirk Olmes <dirk.olmes@codedo.de>
parents: 15
diff changeset
20
4217059d40e8 Test zum Empfang einer ganzen JMS Message, nicht nur der Payload
Dirk Olmes <dirk.olmes@codedo.de>
parents: 15
diff changeset
21 @JmsListener(destination = "validated", containerFactory = Application.AMQ_FACTORY_BEAN)
4217059d40e8 Test zum Empfang einer ganzen JMS Message, nicht nur der Payload
Dirk Olmes <dirk.olmes@codedo.de>
parents: 15
diff changeset
22 public void receive(TextMessage message) {
4217059d40e8 Test zum Empfang einer ganzen JMS Message, nicht nur der Payload
Dirk Olmes <dirk.olmes@codedo.de>
parents: 15
diff changeset
23 LOG.info("received message {}", message);
4217059d40e8 Test zum Empfang einer ganzen JMS Message, nicht nur der Payload
Dirk Olmes <dirk.olmes@codedo.de>
parents: 15
diff changeset
24 }
15
ad77abd85976 playground for spring boot JMS handling
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff changeset
25 }