MQTT Events
Some lifetime events are fired by the MqttBroker and can be handled using the following callbacks:
Example
In the following example a message is sent as soon as the client is connected.
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services
.AddSilverback()
.WithConnectionToMessageBroker(options => options
.AddMqtt())
.AddSingletonBrokerCallbacksHandler<ConnectionCallbackHandler>();
}
}