@@ -9,140 +9,47 @@ To successfully use the examples you will need a running RabbitMQ server.
9
9
10
10
### Requirements on Windows
11
11
12
- You need the RabbitMQ dotnet client.
13
-
14
- * Download [ RabbitMQ .NET client] ( https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_5_4/rabbitmq-dotnet-client-3.5.4-dotnet-4.0.zip )
15
- * Extract it and copy "RabbitMQ.Client.dll" to your working folder.
16
-
17
- You also need to ensure your system can find the C# compiler ` csc.exe ` ,
18
- you may need to add ` ;C:\Windows\Microsoft.NET\Framework\v4.0.30319 ` (change .NET version
19
- to fit your installation) to your ` PATH ` .
12
+ * [ dotnet core] ( https://www.microsoft.com/net/core )
20
13
21
14
We're using the command line (start->run cmd.exe) to
22
- compile and run the code. Alternatively you could [ use Visual Studio] ( https://github.com/rabbitmq/rabbitmq-tutorials/tree/master/dotnet-visual-studio ) and [ NuGet package] ( https://www.nuget.org/packages/RabbitMQ.Client/ ) , but
23
- this set of tutorials assumes the command line.
15
+ compile and run -p the code. Alternatively you could [ use Visual Studio] ( https://github.com/rabbitmq/rabbitmq-tutorials/tree/master/dotnet-visual-studio ) and [ NuGet package] ( https://www.nuget.org/packages/RabbitMQ.Client/ ) , but this set of tutorials assumes
16
+ the command line.
24
17
25
18
### Requirements on Linux
26
19
27
- You need Mono and RabbitMQ dotnet client.
28
-
29
- sudo apt-get install mono-devel
30
- mkdir lib
31
- cd lib
32
- wget https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_5_4/rabbitmq-dotnet-client-3.5.4-dotnet-4.0.zip
33
- unzip rabbitmq-dotnet-client-3.5.4-dotnet-4.0.zip
34
- cd ..
35
-
20
+ * [ dotnet core] ( https://www.microsoft.com/net/core )
36
21
37
22
## Code
38
23
39
- #### [ Tutorial one: "Hello World!"] ( http://www.rabbitmq.com/tutorial-one-dotnet.html )
40
-
41
- ##### Windows
42
-
43
- csc /r:"RabbitMQ.Client.dll" Send.cs
44
- csc /r:"RabbitMQ.Client.dll" Receive.cs
45
-
46
- Send.exe
47
- Receive.exe
48
-
49
- ##### Linux
50
-
51
- gmcs -r:lib/bin/RabbitMQ.Client.dll Send.cs
52
- gmcs -r:lib/bin/RabbitMQ.Client.dll Receive.cs
24
+ Each command is best run -p in a separate console/terminal instance run from the root
25
+ of the tutorial directory.
53
26
54
- MONO_PATH=lib/bin mono Send.exe
55
- MONO_PATH=lib/bin mono Receive.exe
27
+ #### [ Tutorial one: "Hello World!"] ( http://www.rabbitmq.com/tutorial-one-dotnet.html )
56
28
29
+ dotnet run -p Receive
30
+ dotnet run -p Send
57
31
58
32
#### [ Tutorial two: Work Queues] ( http://www.rabbitmq.com/tutorial-two-dotnet.html )
59
33
60
-
61
- ##### Windows
62
-
63
- csc /r:"RabbitMQ.Client.dll" NewTask.cs
64
- csc /r:"RabbitMQ.Client.dll" Worker.cs
65
-
66
- NewTask.exe
67
- Worker.exe
68
-
69
- ##### Linux
70
-
71
- gmcs -r:lib/bin/RabbitMQ.Client.dll NewTask.cs
72
- gmcs -r:lib/bin/RabbitMQ.Client.dll Worker.cs
73
-
74
- MONO_PATH=lib/bin mono NewTask.exe
75
- MONO_PATH=lib/bin mono Worker.exe
34
+ dotnet run -p Worker
35
+ dotnet run -p NewTask
76
36
77
37
#### [ Tutorial three: Publish/Subscribe] ( http://www.rabbitmq.com/tutorial-three-dotnet.html )
78
38
79
- ##### Windows
80
-
81
- csc /r:"RabbitMQ.Client.dll" ReceiveLogs.cs
82
- csc /r:"RabbitMQ.Client.dll" EmitLog.cs
83
-
84
- ReceiveLogs.exe
85
- EmitLog.exe
86
-
87
- ##### Linux
88
-
89
- gmcs -r:lib/bin/RabbitMQ.Client.dll ReceiveLogs.cs
90
- gmcs -r:lib/bin/RabbitMQ.Client.dll EmitLog.cs
91
-
92
- MONO_PATH=lib/bin mono ReceiveLogs.exe
93
- MONO_PATH=lib/bin mono EmitLog.exe
39
+ dotnet run -p ReceiveLogs
40
+ dotnet run -p EmitLog
94
41
95
42
#### [ Tutorial four: Routing] ( http://www.rabbitmq.com/tutorial-four-dotnet.html )
96
43
97
- ##### Windows
98
-
99
- csc /r:"RabbitMQ.Client.dll" ReceiveLogsDirect.cs
100
- csc /r:"RabbitMQ.Client.dll" EmitLogDirect.cs
101
-
102
- ReceiveLogsDirect.exe
103
- EmitLogDirect.exe
104
-
105
- ##### Linux
106
-
107
- gmcs -r:lib/bin/RabbitMQ.Client.dll ReceiveLogsDirect.cs
108
- gmcs -r:lib/bin/RabbitMQ.Client.dll EmitLogDirect.cs
109
-
110
- MONO_PATH=lib/bin mono ReceiveLogsDirect.exe
111
- MONO_PATH=lib/bin mono EmitLogDirect.exe
44
+ dotnet run -p ReceiveLogsDirect info
45
+ dotnet run -p EmitLogDirect
112
46
113
47
#### [ Tutorial five: Topics] ( http://www.rabbitmq.com/tutorial-five-dotnet.html )
114
48
115
- ##### Windows
116
-
117
- csc /r:"RabbitMQ.Client.dll" ReceiveLogsTopic.cs
118
- csc /r:"RabbitMQ.Client.dll" EmitLogTopic.cs
119
-
120
- ReceiveLogsTopic.exe
121
- EmitLogTopic.exe
122
-
123
- ##### Linux
124
-
125
- gmcs -r:lib/bin/RabbitMQ.Client.dll ReceiveLogsTopic.cs
126
- gmcs -r:lib/bin/RabbitMQ.Client.dll EmitLogTopic.cs
127
-
128
- MONO_PATH=lib/bin mono ReceiveLogsTopic.exe
129
- MONO_PATH=lib/bin mono EmitLogTopic.exe
49
+ dotnet run -p ReceiveLogsTopic anonymous.info
50
+ dotnet run -p EmitLogTopic
130
51
131
52
#### [ Tutorial six: RPC] ( http://www.rabbitmq.com/tutorial-six-dotnet.html )
132
53
133
- ##### Windows
134
-
135
- csc /r:"RabbitMQ.Client.dll" RPCServer.cs
136
- csc /r:"RabbitMQ.Client.dll" RPCClient.cs
137
-
138
- RPCServer.exe
139
- RPCClient.exe
140
-
141
- ##### Linux
142
-
143
- gmcs -r:lib/bin/RabbitMQ.Client.dll RPCServer.cs
144
- gmcs -r:lib/bin/RabbitMQ.Client.dll RPCClient.cs
145
-
146
- MONO_PATH=lib/bin mono RPCServer.exe
147
- MONO_PATH=lib/bin mono RPCClient.exe
148
-
54
+ dotnet run -p RPCServer
55
+ dotnet run -p RPCClient
0 commit comments