### Przykady uycia Spring XD


### Uruchamianie Spring XD i powoki
$ xd-singlenode --transport rabbit
$ xd-shell

### Strumienie i podsuchy

xd:> stream create --name docs-pdf --definition "rabbit | log"
xd:> stream create --name pdftap --definition "tap:stream:docs-pdf > counter --name=pdfcount"


### Przykad dokumentu XML - mona go wysa do Spring XD przez konsol sieciow RabbitMQ
<document>
	<documentid>94f68193-89a7-4834-a1e3-76768e9a5ddf</documentid>
	<name>Spring XD</name>
	<type>
		<typeid>41e2d211-6396-4f23-9690-77bc2820d84b</typeid>
		<name>PDF</name>
		<extension>.pdf</pdf>
	</type>
</document>


### Adresy URL z danymi analitycznymi:
http://localhost:9393/metrics

## Licznik PDF
http://localhost:9393/metrics/counters/pdfcount


xd:>stream undeploy --name pdftap
xd:>stream undeploy --name docs-pdf


### Lista:
xd:>stream list
  Stream Name  Stream Definition                              Status
  -----------  ---------------------------------------------  ------
  docs-pdf     rabbit | log
  pdftap       tap:stream:docs-pdf > counter --name=pdfcount


### Usunicie
xd:>stream destroy --name pdftap
Destroyed stream 'pdftap'

xd:>stream destroy --name docs-pdf
Destroyed stream 'docs-pdf'

