Documentation
¶
Overview ¶
Subscriber is a watermill subscriber that reads messages from Oracle Advanced Queue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPublisherClosed = errors.New("publisher is closed")
)
View Source
var (
ErrSubscriberClosed = errors.New("subscriber is closed")
)
Functions ¶
This section is empty.
Types ¶
type JSONMarshaler ¶
type JSONMarshaler struct{}
JSONMarshaler uses encoding/json to marshal Watermill messages.
type Marshaler ¶
type Marshaler interface { // Marshal transforms a watermill message into NATS wire format. Marshal(msg *message.Message) (AQMessage, error) }
Marshaler provides transport encoding functions
type MarshalerUnmarshaler ¶
type MarshalerUnmarshaler interface { Marshaler Unmarshaler }
MarshalerUnmarshaler provides both Marshaler and Unmarshaler implementations
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher inserts the Messages as rows into a SQL table..
func NewPublisher ¶
func NewPublisher(db Transactor, config PublisherConfig, logger watermill.LoggerAdapter) (*Publisher, error)
type PublisherConfig ¶
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
func NewSubscriber ¶
func NewSubscriber(db Transactor, config SubscriberConfig, logger watermill.LoggerAdapter) (*Subscriber, error)
func (*Subscriber) Close ¶
func (s *Subscriber) Close() error
func (*Subscriber) SubscribeInitialize ¶
func (s *Subscriber) SubscribeInitialize(topic string) error
type SubscriberConfig ¶
type SubscriberConfig struct { QueueConsumer string // Name of the queue subscriber/consumer Payload string // Payload type Transformation string // Payload oracle transformation name QueueWaitTime time.Duration // Wait time for the queue to return data BatchSize int // Number of messages to fetch in a single call Timeout time.Duration // Timeout for the sql query operation Unmarshaler Unmarshaler }
type Transactor ¶
Click to show internal directories.
Click to hide internal directories.