Commit c71ce066 authored by Marc Gravell's avatar Marc Gravell

Events documentation

parent 32ff9179
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<Link>README.md</Link> <Link>README.md</Link>
</None> </None>
<None Include="Basics.md" /> <None Include="Basics.md" />
<None Include="Events.md" />
<None Include="PipelinesMultiplexers.md" /> <None Include="PipelinesMultiplexers.md" />
<None Include="Transactions.md" /> <None Include="Transactions.md" />
</ItemGroup> </ItemGroup>
......
Events
===
The `ConnectionMultiplexer` type exposes multiple events that can be used to understand what is happening under the covers. This can be useful in particular for logging purposes.
- `ConfigurationChanged` - raised when the configuration of a connection is changed from inside the `ConnectionMultiplexer`
- `ConfigurationChangedBroadcast` - raised when a reconfiguration message is received via pub/sub; this is most commonly caused by `IServer.MakeMaster` being used to change a node's replication configuration, which can optionally broadcast such a request to all clients
- `ConnectionFailed` - raised when a connection fails for any reason; note that you will not receive further `ConnectionFailed` notifications for that connection until connectivity has been re-established
- `ConnectionRestored` - raised when connectivity is re-established to a node that previously failed
- `ErrorMessage` - raised when the redis server responds to any user-initiated request with an error message; this is in addition to the regular exception / fault that will be reported to the immediate caller
- `HashSlotMoved` - raised when a "redis cluster" indicates that a hash-slot has been migrated between nodes; note that requests will normally be automatically re-routed, so the user is not required to do anything special here
- `InternalError` - raised when the library fails in some unanticipated way; this is intended primarily for debugging purposes, and most users should have no need of this event
Note that the pub/sub implementation in StackExchange.Redis works *similarly* to events, with `Subscribe` / `SubscribeAsync` accepting an `Action<RedisChannel, RedisValue>` callback that is invoked when messages are received.
\ No newline at end of file
...@@ -30,6 +30,7 @@ Documentation ...@@ -30,6 +30,7 @@ Documentation
- [Pipelines and Multiplexers](https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/PipelinesMultiplexers.md) - what is a multiplexer? - [Pipelines and Multiplexers](https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/PipelinesMultiplexers.md) - what is a multiplexer?
- [Keys, Values and Channels](https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/KeysValues.md) - discusses the data-types used on the API - [Keys, Values and Channels](https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/KeysValues.md) - discusses the data-types used on the API
- [Transactions](https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/Transactions.md) - how atomic transactions work in redis - [Transactions](https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/Transactions.md) - how atomic transactions work in redis
- [Events](https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/Events.md) - the events available for logging / information purposes
Questions and Contributions Questions and Contributions
--- ---
......
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