com.github.fridujo.sample.amqp.Receiver Maven / Gradle / Ivy
package com.github.fridujo.sample.amqp;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
@Component
public class Receiver {
private final List messages = new ArrayList<>();
public void receiveMessage(String message) {
System.out.println("Received <" + message + ">");
this.messages.add(message);
}
public List getMessages() {
return messages;
}
}