Package org.localify.data.ingest
Class RabbitReceiver
java.lang.Object
org.localify.data.ingest.RabbitReceiver
@Service
@ConditionalOnProperty(prefix="localify.scraper",
name="ingest",
havingValue="true")
public class RabbitReceiver
extends Object
A service for receiving messages from RabbitMQ.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a response from a BandsInTown name scrape. -
Constructor Summary
ConstructorsConstructorDescriptionRabbitReceiver(ScraperIngest scraperIngest, com.fasterxml.jackson.databind.ObjectMapper objectMapper, RecommendService recommendService, LocalifyProperties properties) Constructs a new RabbitReceiver. -
Method Summary
Modifier and TypeMethodDescriptionvoidreceiveNameScrapeMatch(org.springframework.amqp.core.Message response) Receives messages from the scraper_responses queue.
-
Constructor Details
-
RabbitReceiver
@Autowired public RabbitReceiver(ScraperIngest scraperIngest, com.fasterxml.jackson.databind.ObjectMapper objectMapper, RecommendService recommendService, LocalifyProperties properties) Constructs a new RabbitReceiver.- Parameters:
scraperIngest- The scraper ingest service.objectMapper- The object mapper.recommendService- The recommendation service.properties- The application properties.
-
-
Method Details
-
receiveNameScrapeMatch
@RabbitListener(queues="scraper_responses") public void receiveNameScrapeMatch(@Payload org.springframework.amqp.core.Message response) throws IOException Receives messages from the scraper_responses queue.- Parameters:
response- The message from the queue.- Throws:
IOException- If an I/O error occurs.
-