Files
spring-integration-samples/basic/quote
Artem Bilan 361866da58 Move main to version 6.0
* Upgrade to the latest dependencies
* Migrate samples to `jakarta` namespace
* Rework `cafe-scripted` to RSocket instead of already removed RMI
* Migrate JMS samples to Apache Artemis for Jakarta EE 9
* Disables mails tests since there is a requirement to migrate to Greenmail for Jakarta EE 9 support
* Rework `generatePom` task to a new `maven-publish` plugin style
2022-01-20 17:10:31 -05:00
..
2019-03-22 14:52:00 -04:00
2022-01-20 17:10:31 -05:00

Quote Sample

This example demonstrates the following aspects of the CORE EIP support available with Spring Integration:

  1. Channel Adapter (Inbound and Stdout)
  2. Poller with Interval Triggers
  3. Service Activator

It is a very simple example that introduces you to Channel adapters and Pollers.

Messages are simply being emitted by the Poller (interval based) triggering the nextTicker() method of the TickerStream class and are then sent to a tickers channel, from which they are retrieved by the TickerStream service.

The TickerStream service generates random ticker symbols, sending them to the quotes channel, from which they are retrieved by the QuoteService (annotation based Service Activator). The QuoteService generates random quotes, sending them to the Stdout Channel Adapter, where they are printed to the console.

To execute sample simply run QuoteDemoTest. You should see the output similar to this:

XNY: 90.03
XMR: 17.11
IWR: 35.85
KHR: 54.43
WUW: 95.29
YYC: 7.44
DYW: 84.76
TIW: 28.31
HGE: 28.90