io.quarkus.qe.amqp.PriceConsumer Maven / Gradle / Ivy
package io.quarkus.qe.amqp;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import jakarta.enterprise.context.ApplicationScoped;
import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.jboss.logging.Logger;
@ApplicationScoped
public class PriceConsumer {
private static final Logger LOG = Logger.getLogger(PriceProducer.class.getName());
private final ConcurrentLinkedQueue prices = new ConcurrentLinkedQueue<>();
@Incoming("prices")
public void process(Integer price) {
LOG.info("process fired: " + price);
this.prices.add(price);
}
public Queue getPrices() {
return prices;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy