Class MqttBroker
An IBroker implementation for MQTT.
Inherited Members
Namespace: Silverback.Messaging.Broker
Assembly: Silverback.Integration.MQTT.dll
Syntax
public class MqttBroker : Broker<MqttProducerEndpoint, MqttConsumerEndpoint>, IBroker, IDisposable
Constructors
| Improve this doc View sourceMqttBroker(IServiceProvider)
Initializes a new instance of the MqttBroker class.
Declaration
public MqttBroker(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider | The IServiceProvider to be used to resolve the required services. |
Methods
| Improve this doc View sourceInstantiateConsumer(MqttConsumerEndpoint, IBrokerBehaviorsProvider<IConsumerBehavior>, IServiceProvider)
Returns a new instance of IConsumer to subscribe to the specified endpoint.
Declaration
protected override IConsumer InstantiateConsumer(MqttConsumerEndpoint endpoint, IBrokerBehaviorsProvider<IConsumerBehavior> behaviorsProvider, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
MqttConsumerEndpoint | endpoint | The endpoint. |
IBrokerBehaviorsProvider<IConsumerBehavior> | behaviorsProvider | |
IServiceProvider | serviceProvider | The IServiceProvider instance to be used to resolve the needed types or to be forwarded to the consumer. |
Returns
Type | Description |
---|---|
IConsumer | The instantiated IConsumer. |
Overrides
| Improve this doc View sourceInstantiateProducer(MqttProducerEndpoint, IBrokerBehaviorsProvider<IProducerBehavior>, IServiceProvider)
Returns a new instance of IProducer to publish to the specified endpoint. The returned instance will be cached and reused for the same endpoint.
Declaration
protected override IProducer InstantiateProducer(MqttProducerEndpoint endpoint, IBrokerBehaviorsProvider<IProducerBehavior> behaviorsProvider, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
MqttProducerEndpoint | endpoint | The endpoint. |
IBrokerBehaviorsProvider<IProducerBehavior> | behaviorsProvider | |
IServiceProvider | serviceProvider | The IServiceProvider instance to be used to resolve the needed types or to be forwarded to the consumer. |
Returns
Type | Description |
---|---|
IProducer | The instantiated IProducer. |