Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package com.springbootdev.samples.rabbitmq.consumer.listener;
import com.springbootdev.samples.rabbitmq.consumer.model.Order;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
@RabbitListener(queues = {"orders_queue"})
public class Consumer {
private static final Logger LOGGER = LoggerFactory.getLogger(Consumer.class);
public void receiveMessage(Order order)
{" receive message [" + order.toString() + "] ");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment