Versions in this module Expand all Collapse all v42 v42.101.5 Jun 13, 2024 v42.5.0 Jun 18, 2024 Changes in this version + const ConnectOperation + const PublishOperation + const SubscribeOperation + type Client struct + func NewMQTTClient(config types.MessageBusConfig) (*Client, error) + func NewMQTTClientWithCreator(config types.MessageBusConfig, marshaller MessageMarshaller, ...) (*Client, error) + func (mc *Client) Connect() error + func (mc *Client) Disconnect() error + func (mc *Client) Publish(message types.MessageEnvelope, topic string) error + func (mc *Client) Request(message types.MessageEnvelope, requestTopic string, responseTopicPrefix string, ...) (*types.MessageEnvelope, error) + func (mc *Client) Subscribe(topics []types.TopicChannel, messageErrors chan error) error + func (mc *Client) Unsubscribe(topics ...string) error + type ClientCreator func(config types.MessageBusConfig, handler pahoMqtt.OnConnectHandler) (pahoMqtt.Client, error) + func ClientCreatorWithCertLoader(certCreator pkg.X509KeyPairCreator, certLoader pkg.X509KeyLoader, ...) ClientCreator + func DefaultClientCreator() ClientCreator + type ConnectionOptions struct + BrokerURL string + type MQTTClientConfig struct + BrokerURL string + func CreateMQTTClientConfiguration(messageBusConfig types.MessageBusConfig) (MQTTClientConfig, error) + type MQTTClientOptions struct + AutoReconnect bool + CleanSession bool + ClientId string + ConnectTimeout int + KeepAlive int + Password string + Qos int + Retained bool + Username string + func CreateMQTTClientOptionsWithDefaults() MQTTClientOptions + type MessageMarshaller func(v interface{}) ([]byte, error) + type MessageUnmarshaller func(data []byte, v interface{}) error + type OperationErr struct + func NewOperationErr(operation string, message string) OperationErr + func (oe OperationErr) Error() string + type TimeoutErr struct + func NewTimeoutError(operation string, message string) TimeoutErr + func (te TimeoutErr) Error() string