Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package com.springbootdev.examples.consumer.service;
import com.springbootdev.examples.consumer.model.Car;
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 = {"all_cars_queue", "nissan_cars_queue"})
public class ConsumerService
private static final Logger logger = LoggerFactory.getLogger(ConsumerService.class);
public void receiveMessage(Car car)
{" receive message [" + car.toString() + "] ");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment