v5

package
v0.0.0-...-d09eed2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Scheme           = "mqtt"
	PropertiesPrefix = "camel.component." + Scheme

	AttributeMqttMessageID        = "camel.apache.org/mqtt.message.id"
	AttributeMqttMessageRetained  = "camel.apache.org/mqtt.message.retained"
	AttributeMqttMessageDuplicate = "camel.apache.org/mqtt.message.duplicate"
	AttributeMqttMessageQUOS      = "camel.apache.org/mqtt.message.qus"
)

Variables

This section is empty.

Functions

func NewComponent

func NewComponent(ctx api.Context, _ map[string]interface{}) (api.Component, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) Publish

func (c *Client) Publish(ctx context.Context, p *paho.Publish) error

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

func (*Client) Stop

func (c *Client) Stop(_ context.Context) error

func (*Client) Subscribe

func (c *Client) Subscribe(ctx context.Context, topic string) error

type Component

type Component struct {
	components.DefaultComponent
}

func (*Component) Endpoint

func (c *Component) Endpoint(config api.Parameters) (api.Endpoint, error)

type Config

type Config struct {
	Remaining string  `mapstructure:"remaining"`
	Broker    string  `mapstructure:"broker"`
	ClientID  string  `mapstructure:"clientId"`
	Retained  bool    `mapstructure:"retained"`
	QoS       byte    `mapstructure:"qus"`
	Username  string  `mapstructure:"username"`
	Password  string  `mapstructure:"password"`
	Keepalive *uint16 `mapstructure:"keepalive"`
}

type Consumer

type Consumer struct {
	components.DefaultConsumer
	// contains filtered or unexported fields
}

func (*Consumer) Endpoint

func (c *Consumer) Endpoint() camel.Endpoint

func (*Consumer) Receive

func (c *Consumer) Receive(ctx actor.Context)

func (*Consumer) Start

func (c *Consumer) Start(ctx context.Context) error

func (*Consumer) Stop

func (c *Consumer) Stop(ctx context.Context) error

type Endpoint

type Endpoint struct {
	components.DefaultEndpoint
	// contains filtered or unexported fields
}

func (*Endpoint) Consumer

func (e *Endpoint) Consumer(pid *actor.PID) (api.Consumer, error)

func (*Endpoint) Producer

func (e *Endpoint) Producer() (api.Producer, error)

func (*Endpoint) Start

func (e *Endpoint) Start(context.Context) error

func (*Endpoint) Stop

func (e *Endpoint) Stop(context.Context) error

type OptionFn

type OptionFn func(*paho.ClientConfig)

func WithSingleHandlerRouter

func WithSingleHandlerRouter(handler func(*paho.Publish)) OptionFn

type Producer

type Producer struct {
	components.DefaultProducer
	// contains filtered or unexported fields
}

func (*Producer) Endpoint

func (p *Producer) Endpoint() api.Endpoint

func (*Producer) Receive

func (p *Producer) Receive(ac actor.Context)

func (*Producer) Start

func (p *Producer) Start(ctx context.Context) error

func (*Producer) Stop

func (p *Producer) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL