producer

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoReconnectProducer

type AutoReconnectProducer struct {
	Connected bool

	Queue   *amqp.Queue   // amqp queue
	Channel *amqp.Channel //amqp channel
	// contains filtered or unexported fields
}

AutoReconnectProducer Rec This producer can auto reconnect MQ

func CreateNew

func CreateNew(config *config.AmqpConfig) (*AutoReconnectProducer, error)

CreateNew new instance for AutoReconnectProducer.

func (*AutoReconnectProducer) Close

func (s *AutoReconnectProducer) Close()

Close close connection

func (*AutoReconnectProducer) PublishMessage

func (s *AutoReconnectProducer) PublishMessage(exchange string, contentType string, bytes []byte) error

PublishMessage spd

func (*AutoReconnectProducer) SendProtobuf

func (s *AutoReconnectProducer) SendProtobuf(exchange string, bytes []byte) error

SendProtobuf spd

Jump to

Keyboard shortcuts

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