test -> hello, layout
This commit is contained in:
parent
ff20591fc9
commit
00b3effa50
@ -6,9 +6,10 @@ tutorials](http://www.rabbitmq.com/getstarted.html).
|
|||||||
You'll need erlang installed, and also access to a [RabbitMQ server](http://www.rabbitmq.com/server.html).
|
You'll need erlang installed, and also access to a [RabbitMQ server](http://www.rabbitmq.com/server.html).
|
||||||
These are easy to [install](http://www.rabbitmq.com/install.html).
|
These are easy to [install](http://www.rabbitmq.com/install.html).
|
||||||
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
### For Mono on Linux.
|
### Mono on Linux
|
||||||
You need Mono and RabbitMQ dotnet client.
|
You need Mono and RabbitMQ dotnet client.
|
||||||
|
|
||||||
sudo apt-get install mono-devel
|
sudo apt-get install mono-devel
|
||||||
@ -18,17 +19,20 @@ You need Mono and RabbitMQ dotnet client.
|
|||||||
unzip rabbitmq-dotnet-client-2.1.1-dotnet-3.0.zip
|
unzip rabbitmq-dotnet-client-2.1.1-dotnet-3.0.zip
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
### For Windows
|
|
||||||
|
### Windows
|
||||||
You need the RabbitMQ dotnet client.
|
You need the RabbitMQ dotnet client.
|
||||||
|
|
||||||
Go to http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v2.1.1
|
Go to http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v2.1.1
|
||||||
Download rabbitmq-dotnet-client-2.1.1-dotnet-3.0.zip
|
Download rabbitmq-dotnet-client-2.1.1-dotnet-3.0.zip
|
||||||
Extract it to rabbitmq-dotnet-client-2.1.1-dotnet-3.0 in your working folder
|
Extract it to rabbitmq-dotnet-client-2.1.1-dotnet-3.0 in your working folder
|
||||||
|
|
||||||
|
|
||||||
## Code
|
## Code
|
||||||
|
|
||||||
For background, you can refer to [Tutorial one: "Hello World!"](http://www.rabbitmq.com/tutorial-one-python.html):
|
For background, you can refer to [Tutorial one: "Hello World!"](http://www.rabbitmq.com/tutorial-one-python.html):
|
||||||
|
|
||||||
|
|
||||||
### Compile and run the C# examples using Mono on Linux.
|
### Compile and run the C# examples using Mono on Linux.
|
||||||
|
|
||||||
gmcs -r:lib/bin/RabbitMQ.Client.dll Send.cs
|
gmcs -r:lib/bin/RabbitMQ.Client.dll Send.cs
|
||||||
@ -37,6 +41,7 @@ For background, you can refer to [Tutorial one: "Hello World!"](http://www.rabbi
|
|||||||
gmcs -r:lib/bin/RabbitMQ.Client.dll Receive.cs
|
gmcs -r:lib/bin/RabbitMQ.Client.dll Receive.cs
|
||||||
MONO_PATH=lib/bin mono Receive.exe
|
MONO_PATH=lib/bin mono Receive.exe
|
||||||
|
|
||||||
|
|
||||||
### Compile the C# examples on Windows
|
### Compile the C# examples on Windows
|
||||||
|
|
||||||
Ensure your system can find the c# compiler `csc.exe`
|
Ensure your system can find the c# compiler `csc.exe`
|
||||||
@ -44,29 +49,32 @@ Ensure your system can find the c# compiler `csc.exe`
|
|||||||
e.g. Add `;C:\WINDOWS\Microsoft.NET\Framework\v3.5` to your Path
|
e.g. Add `;C:\WINDOWS\Microsoft.NET\Framework\v3.5` to your Path
|
||||||
|
|
||||||
If you put the whole client directory in your working directory:
|
If you put the whole client directory in your working directory:
|
||||||
|
|
||||||
csc /r:".\rabbitmq-dotnet-client-2.1.1-dotnet-3.0\bin\RabbitMQ.Client.dll" Send.cs
|
csc /r:".\rabbitmq-dotnet-client-2.1.1-dotnet-3.0\bin\RabbitMQ.Client.dll" Send.cs
|
||||||
csc /r:".\rabbitmq-dotnet-client-2.1.1-dotnet-3.0\bin\RabbitMQ.Client.dll" Receive.cs
|
csc /r:".\rabbitmq-dotnet-client-2.1.1-dotnet-3.0\bin\RabbitMQ.Client.dll" Receive.cs
|
||||||
|
|
||||||
or, if you just copy the RabbitMQ.Client.dll client library to your working directory:
|
or, if you just copy the RabbitMQ.Client.dll client library to your working directory:
|
||||||
|
|
||||||
csc /r:"RabbitMQ.Client.dll" Send.cs
|
csc /r:"RabbitMQ.Client.dll" Send.cs
|
||||||
csc /r:"RabbitMQ.Client.dll" Receive.cs
|
csc /r:"RabbitMQ.Client.dll" Receive.cs
|
||||||
|
|
||||||
or you could use MS Visual Studio.
|
or you could use MS Visual Studio.
|
||||||
|
|
||||||
|
|
||||||
### Run the example programs on Windows
|
### Run the example programs on Windows
|
||||||
|
|
||||||
Open 3 terminal windows Start > Run... cmd
|
Open 3 Command Prompt windows Start > Run... cmd
|
||||||
|
|
||||||
Use `rabbitmqctl status` to check the server is running,
|
Use `rabbitmqctl status` to check the server is running,
|
||||||
and `rabbitmqctl list_queues` to inspect the queue.
|
and `rabbitmqctl list_queues` to inspect the queue.
|
||||||
|
|
||||||
In the other two, navigate to your working directory to run the example client programs.
|
In the other two windows, navigate to your working directory to run the example client programs.
|
||||||
|
|
||||||
In another cmd window, send a message:
|
In another cmd window, send a message:
|
||||||
|
|
||||||
Send.exe
|
Send.exe
|
||||||
|
|
||||||
Check queue identified as "test" has 1 message.
|
Check queue identified as "hello" has 1 message.
|
||||||
In the final cmd window, set the listener going:
|
In the final cmd window, set the listener going:
|
||||||
|
|
||||||
Receive.exe
|
Receive.exe
|
||||||
|
Loading…
Reference in New Issue
Block a user