broker

package
v0.0.0-...-7d43bac Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package broker provides support for message broker.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Topic   string         // message topic
	Value   interface{}    // message value - typically JSON payload
	Context MessageContext // message context
}

Message represents structure which will be passed to message broker.

type MessageBroker

type MessageBroker interface {
	PublishMessage(ctx context.Context, message Message) error
	Subscribe(ctx context.Context, key string) (<-chan Message, error)

	system.Disposer
}

MessageBroker represents pub/sub mechanism.

type MessageContext

type MessageContext map[string]interface{}

MessageContext represents context which is passed with a message.

Directories

Path Synopsis
Package kafka provides support for Kafka message broker.
Package kafka provides support for Kafka message broker.
Package rabbitmq provides support for RabbitMQ message broker.
Package rabbitmq provides support for RabbitMQ message broker.

Jump to

Keyboard shortcuts

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