25.02.2015 Views

Introducing Spring Framework

Introducing Spring Framework

Introducing Spring Framework

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using <strong>Spring</strong> XD with My Documents<br />

Chapter 20 ■ Your First <strong>Spring</strong> XD Application<br />

Enough about concepts! Let’s start playing around with <strong>Spring</strong> XD. The main idea of using <strong>Spring</strong> XD within your<br />

My Documents <strong>Spring</strong> application is to get some metrics on the number of PDF documents you are receiving from<br />

RabbitMQ. See Figure 20-2 for a general overview of what you need to accomplish.<br />

Producer<br />

Sends New<br />

Document in XML<br />

Format<br />

RabbitMQ<br />

My Documents<br />

<strong>Spring</strong> XD<br />

- Stream (RabbitMQ)<br />

- Tap (PDF Counter)<br />

Figure 20-2. Using <strong>Spring</strong> XD with the My Documents Application<br />

Figure 20-2 shows a basic architecture where you are going to use <strong>Spring</strong> XD along with the My Documents<br />

application. Because you are going to use RabbitMQ, you need to make sure it is up and running. After that, let’s start<br />

<strong>Spring</strong> XD. The following command will start the <strong>Spring</strong> XD runtime:<br />

xd-singlenode --transport rabbit<br />

Figure 20-3 shows the output of executing the <strong>Spring</strong> XD runtime that will use RabbitMQ as messaging queue<br />

transport mechanism.<br />

Figure 20-3. Running xd-singlenode –transport Rabbit Will Use RabbitMQ as a Messaging Queue Mechanism<br />

279

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!