2017-02-03 21:48:18 -05:00
|
|
|
# Running the .NET AMQP example
|
|
|
|
|
|
|
|
|
|
|
|
# Pre-requisites:
|
|
|
|
|
|
|
|
All of this can be done on Linux, Mac and... Windows
|
|
|
|
|
|
|
|
- Install .NET
|
|
|
|
|
|
|
|
https://www.microsoft.com/net/core
|
|
|
|
|
|
|
|
|
|
|
|
- Visual Studio Code is free and may be useful:
|
|
|
|
|
|
|
|
https://code.visualstudio.com
|
|
|
|
|
|
|
|
|
|
|
|
- Powershell might be also useful:
|
|
|
|
|
|
|
|
https://github.com/PowerShell/PowerShell/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# running the example
|
|
|
|
|
|
|
|
- Create the broker, by running:
|
|
|
|
|
|
|
|
```
|
2017-05-08 18:39:00 -04:00
|
|
|
../../../../../bin/artemis create ./server1 --user a --password a --role a --allow-anonymous --force
|
2017-02-03 21:48:18 -05:00
|
|
|
./server1/bin/artemis-service start
|
|
|
|
```
|
|
|
|
|
|
|
|
Or simply use the start-broker.sh script on this directory
|
|
|
|
|
2017-05-08 18:39:00 -04:00
|
|
|
- Create an Topic to subscribe to
|
|
|
|
|
|
|
|
../../../../../bin/artemis queue create --name test-topic --auto-create-address --multicast --preserve-on-no-consumers --durable --address test-topic
|
2017-02-03 21:48:18 -05:00
|
|
|
|
|
|
|
- Compile the code
|
|
|
|
|
2017-02-03 23:28:42 -05:00
|
|
|
You need call restore to download AMQP Library and build it.
|
|
|
|
Restore is part of NuGET which is sort of the Maven Repo for Java devs.
|
2017-02-03 21:48:18 -05:00
|
|
|
|
|
|
|
```sh
|
|
|
|
dotnet restore
|
|
|
|
dotnet build
|
|
|
|
dotnet run
|
|
|
|
```
|
|
|
|
|
|
|
|
Or simply use the run-example.sh script on this directory
|
|
|
|
|
|
|
|
- Debugging
|
|
|
|
|
|
|
|
Visual Studio Code will make it fairly easy to do it
|