backend/src/main/java/com/magamochi/ingestion/queue/producer/MangaContentImageIngestProducer.java

24 lines
839 B
Java

package com.magamochi.ingestion.queue.producer;
import com.magamochi.common.queue.command.MangaContentImageIngestCommand;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@Log4j2
@Service
@RequiredArgsConstructor
public class MangaContentImageIngestProducer {
private final RabbitTemplate rabbitTemplate;
@Value("${queues.manga-content-image-ingest}")
private String mangaContentImageIngestQueue;
public void sendMangaContentImageIngestCommand(MangaContentImageIngestCommand command) {
rabbitTemplate.convertAndSend(mangaContentImageIngestQueue, command);
log.info("Sent manga content image ingest command: {}", command);
}
}