Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Acknowledger ¶ added in v0.1.14
type Acknowledger struct {
// contains filtered or unexported fields
}
Acknowledger is responsible for sending acknowledgement messages to the MQBroker
func NewAcknowledger ¶ added in v0.1.14
func NewAcknowledger(consumed chan amqp.Delivery, toAcknowledge chan transmit.Serializable) Acknowledger
NewAcknowledger isntantiates a new Acknowledger struct
func (*Acknowledger) Start ¶ added in v0.1.14
func (ack *Acknowledger) Start(wg *sync.WaitGroup)
Start asychronously calls StartBlocking via Gorouting
func (*Acknowledger) StartBlocking ¶ added in v0.1.14
func (ack *Acknowledger) StartBlocking()
StartBlocking listens on the two channels for new messages that were consumed but not acknowledged and for messages to acknowledge
type Consumer ¶ added in v0.1.18
type Consumer struct { Output chan<- transmit.Serializable // *desc.RemoteFragmentDesc ToAcknowledge chan amqp.Delivery Exit chan bool QueueName string // contains filtered or unexported fields }
Consumer consumes messages from the messagequeue without acknowledging them
func NewConsumer ¶ added in v0.1.18
func NewConsumer(out chan transmit.Serializable, mqChannel *amqp.Channel, inputQueue string) (consumer Consumer)
NewConsumer creates a message consumer for a listener
func (*Consumer) StartBlocking ¶ added in v0.1.18
func (consumer *Consumer) StartBlocking()
StartBlocking listens on the rabbitMQ messagequeue and redirects messages on the INPUT_QUEUE to a channel
type Listener ¶
type Listener struct { BrokerURL string PrefetchCount int TargetQueue string CanExit chan bool // contains filtered or unexported fields }
Listener is the structure that listens to RabbitMQ and redirects messages to a channel
func NewListener ¶
func NewListener(output, finishedFragments chan transmit.Serializable, brokerURL, inputQueue string, prefetchCount int) (listener Listener, err error)
NewListener creates a new message queue listener
func (*Listener) StartBlocking ¶
func (listener *Listener) StartBlocking()
StartBlocking listens on the rabbitMQ messagequeue and redirects messages on the INPUT_QUEUE to a channel
type MqFragmentDesc ¶
type MqFragmentDesc struct {
desc.RemoteFragmentDesc
}
MqFragmentDesc is a structure describing an iterum fragment to process coming from the MQ For now it is a copy of RemoteFragmentDesc but extensible for the future
func (*MqFragmentDesc) Deserialize ¶
func (mqfd *MqFragmentDesc) Deserialize(data []byte) (err error)
Deserialize tries to decode a json encoded byte array into `mqfd`. Errors on failure
func (*MqFragmentDesc) Serialize ¶
func (mqfd *MqFragmentDesc) Serialize() (data []byte, err error)
Serialize tries to transform `mqfd` into a json encoded bytearray. Errors on failure
type QPublisher ¶ added in v0.2.8
type QPublisher struct { ToPublish chan transmit.Serializable // data.RemoteFragmentDesc Channel *amqp.Channel Queue *amqp.Queue TargetQueue string // contains filtered or unexported fields }
QPublisher is the structure that listens to a channel and publishes messages to rabbitMQ
func NewQPublisher ¶ added in v0.2.8
func NewQPublisher(toPublish chan transmit.Serializable, channel *amqp.Channel, targetQueue string) QPublisher
NewQPublisher creates a new qpublisher which receives messages from a channel and sends them on the message queue.
func (*QPublisher) DeclareQueue ¶ added in v0.2.8
func (qpublisher *QPublisher) DeclareQueue()
DeclareQueue defines the target queue
func (QPublisher) Start ¶ added in v0.2.8
func (qpublisher QPublisher) Start(wg *sync.WaitGroup)
Start asychronously calls StartBlocking via Gorouting
func (*QPublisher) StartBlocking ¶ added in v0.2.8
func (qpublisher *QPublisher) StartBlocking()
StartBlocking listens to the channel, and send remoteFragments to the message queue on the OUTPUT_QUEUE queue.
func (*QPublisher) Stop ¶ added in v0.2.8
func (qpublisher *QPublisher) Stop()
Stop finishes up and notifies the user of its progress
type Sender ¶
type Sender struct { ToLineate chan<- transmit.Serializable // desc.RemoteFragmentDesc Publishers map[string]QPublisher TargetQueue string BrokerURL string // contains filtered or unexported fields }
Sender is the structure that listens to a channel and redirects messages to rabbitMQ
func NewSender ¶
func NewSender(toSend, toLineate chan transmit.Serializable, brokerURL, targetQueue string) (sender Sender, err error)
NewSender creates a new sender which receives messages from a channel and sends them on the message queue.
func (*Sender) StartBlocking ¶
func (sender *Sender) StartBlocking()
StartBlocking listens to the channel, and send remoteFragments to the message queue on the OUTPUT_QUEUE queue.
type SimpleSender ¶ added in v0.2.8
type SimpleSender struct { ToSend chan transmit.Serializable TargetQueue string BrokerURL string // contains filtered or unexported fields }
SimpleSender is the structure that listens to a channel and redirects messages to rabbitMQ
func NewSimpleSender ¶ added in v0.2.8
func NewSimpleSender(toSend chan transmit.Serializable, brokerURL, targetQueue string) (sender SimpleSender)
NewSimpleSender creates a new sender which receives messages from a channel and sends them on the message queue.
func (SimpleSender) Start ¶ added in v0.2.8
func (sender SimpleSender) Start(wg *sync.WaitGroup)
Start asychronously calls StartBlocking via Gorouting
func (*SimpleSender) StartBlocking ¶ added in v0.2.8
func (sender *SimpleSender) StartBlocking()
StartBlocking listens to the channel, and send remoteFragments to the message queue on the OUTPUT_QUEUE queue.
func (SimpleSender) Stop ¶ added in v0.2.8
func (sender SimpleSender) Stop()
Stop finishes up and notifies the user of its progress