Unverified Commit 9370296a authored by Kevin Jones's avatar Kevin Jones Committed by GitHub

Improve pub/sub order documentation (#1351)

First, the link from Basics doesn't work. Second, the docs code samples appear backward, in addition to the casing of the `Subscribe` method being off.
parent 291224fc
......@@ -7,8 +7,10 @@ Processing them sequentially means that you don't need to worry (quite as much)
they will be processed in exactly the same order in which they are received (via a queue) - but as a consequence it means that messages can delay each-other.
```csharp
multiplexer.GetSubscriber().SubScribe("messages", (channel, message) => {
Console.WriteLine((string)message);
var channel = multiplexer.GetSubscriber().Subscribe("messages");
channel.OnMessage(message =>
{
Console.WriteLine((string)message.Message);
});
```
......@@ -17,9 +19,7 @@ responsible for ensuring that concurrent messages don't corrupt your internal st
This works *particularly* well if messages are generally unrelated.
```csharp
var channelMessageQueue = multiplexer.GetSubscriber().SubScribe("messages");
channel.OnMessage(message =>
{
Console.WriteLine((string)message.Message);
multiplexer.GetSubscriber().Subscribe("messages", (channel, message) => {
Console.WriteLine((string)message);
});
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment