Package proximo provides proximo support for substrate


This package support two methods of use. The first is to directly use this package. See the function documentation for more details.

The second method is to use the suburl package. See for more information.

Using suburl

The url structure is proximo://host:port/topic/

Additionally, for sources, the following url parameters are available

offset             - The initial offset. Valid values are `newest` and `oldest`.
consumer-group     - The consumer group id
keep-alive-time    - The interval that a keep alive is performed at as a go duration
keep-alive-timeout - The go duration at which a keepalive will timeout [Default: 10s] (requires keep-alive-time to take effect, if keep-alive-time is not present this is ignored)
insecure=true      - The connection to the proximo grpc endpoint will not be using TLS
max-recv-msg-size  - The gRPC max receive message size in bytes (source only) [Default: 67,108,864 (64MiB)]



This section is empty.


This section is empty.



type AsyncMessageSinkConfig

type AsyncMessageSinkConfig struct {
	Broker    string
	Topic     string
	Insecure  bool
	KeepAlive *KeepAlive

	Debug bool

type AsyncMessageSourceConfig

type AsyncMessageSourceConfig struct {
	ConsumerGroup  string
	Topic          string
	Broker         string
	Offset         Offset
	Insecure       bool
	KeepAlive      *KeepAlive
	MaxRecvMsgSize int

AsyncMessageSource represents a proximo message source and implements the substrate.AsyncMessageSource interface.

type KeepAlive

type KeepAlive struct {
	// Time the interval at which a keep alive is performed
	Time time.Duration
	// TimeOut the duration in which a keep alive is deemed to have failed if no response is received
	Timeout time.Duration

KeepAlive provides configuration for the gRPC keep alive

type Offset

type Offset int64

Offset is the type used to specify the initial subscription offset

const (
	// OffsetOldest indicates the oldest appropriate message available on the broker.
	OffsetOldest Offset = 1
	// OffsetNewest indicates the next appropriate message available on the broker.
	OffsetNewest Offset = 2