Example usage for org.springframework.amqp.rabbit.stocks.domain Stock getStockExchange

List of usage examples for org.springframework.amqp.rabbit.stocks.domain Stock getStockExchange

Introduction

In this page you can find the example usage for org.springframework.amqp.rabbit.stocks.domain Stock getStockExchange.

Prototype

public StockExchange getStockExchange() 

Source Link

Usage

From source file:org.springframework.amqp.rabbit.stocks.gateway.RabbitMarketDataGateway.java

public void sendMarketData() {
    Quote quote = generateFakeQuote();//  w  w w .  ja v a 2s.  c o m
    Stock stock = quote.getStock();
    logger.info("Sending Market Data for " + stock.getTicker());
    String routingKey = "app.stock.quotes." + stock.getStockExchange() + "." + stock.getTicker();
    getRabbitTemplate().convertAndSend(routingKey, quote);
}