snsqs

package
v0.0.0-...-640fa72 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

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

*********

Facade

*******

func NewBroker

func NewBroker(region string) *Broker

func (*Broker) RunConsumer

func (b *Broker) RunConsumer(
	ctx aws.Context,
	url, name string,
	waitTimeSeconds int,
	maxNumberOfMessages int,
	workers int,
	handler MessageHandler,
	logger logrus.FieldLogger)

func (*Broker) RunPair

func (b *Broker) RunPair(
	ctx aws.Context,
	topicArn, topicName string,
	publisherWorkers int,
	published OnPublished,
	queueUrl, queueName string,
	queueWaitTimeSeconds, queueMaxNumberOfMessages int,
	consumerWorkers int,
	handler MessageHandler,
	logger logrus.FieldLogger) Publisher

func (*Broker) RunPublisher

func (b *Broker) RunPublisher(
	ctx aws.Context,
	topicArn, topicName string,
	workers int,
	published OnPublished,
	logger logrus.FieldLogger) Publisher

type Consumer

type Consumer interface {
	cleaner.Cleanable
	Run()
	// contains filtered or unexported methods
}

type MessageHandler

type MessageHandler func(*SNSMessage) error

type OnPublished

type OnPublished func(message []byte, messageId string, failed error)

type Publisher

type Publisher interface {
	cleaner.Cleanable
	Run(OnPublished)
	PublishJson(interface{}) error
	// contains filtered or unexported methods
}

type SNSMessage

type SNSMessage struct {
	Message        string `json:"Message"`
	TopicArn       string `json:"TopicArn"`
	MessageId      string `json:"MessageId"`
	UnsubscribeURL string `json:"UnsubscribeURL"`
}

message from sns to sqs

Jump to

Keyboard shortcuts

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