Documentation ¶
Index ¶
- type BrokerAliceConsumer
- func (ac *BrokerAliceConsumer) AddClientProducer(producer producer.BrokerProducerI)
- func (ac *BrokerAliceConsumer) ConsumeMessages() BrokerConsumerI
- func (ac *BrokerAliceConsumer) GetClientProducer() producer.BrokerProducerI
- func (ac *BrokerAliceConsumer) HandleRouting(msg *BrokerConsumerMessage)
- func (ac *BrokerAliceConsumer) SetMessageHandler(...) BrokerConsumerI
- type BrokerConsumerI
- type BrokerConsumerMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerAliceConsumer ¶
type BrokerAliceConsumer struct {
// contains filtered or unexported fields
}
BrokerAliceConsumer implements the consumer interface
func (*BrokerAliceConsumer) AddClientProducer ¶
func (ac *BrokerAliceConsumer) AddClientProducer(producer producer.BrokerProducerI)
func (*BrokerAliceConsumer) ConsumeMessages ¶
func (ac *BrokerAliceConsumer) ConsumeMessages() BrokerConsumerI
ConsumeMessages starts the consumption of messages by this consumer. The consumer is started in a new goroutine. Every incoming message is passed to the handler on a new goroutine
func (*BrokerAliceConsumer) GetClientProducer ¶
func (ac *BrokerAliceConsumer) GetClientProducer() producer.BrokerProducerI
func (*BrokerAliceConsumer) HandleRouting ¶
func (ac *BrokerAliceConsumer) HandleRouting(msg *BrokerConsumerMessage)
func (*BrokerAliceConsumer) SetMessageHandler ¶
func (ac *BrokerAliceConsumer) SetMessageHandler(handler func(msg *BrokerConsumerMessage, routingKey string, userID string, sessionID string)) BrokerConsumerI
SetMessageHandler sets the message handler this consumer will use. Any incoming message will be transformed and then passed to this handler
handler: func(msg *Message), the method which should handle incoming messages for this consumer
type BrokerConsumerI ¶
type BrokerConsumerI interface { ConsumeMessages() BrokerConsumerI // (msg *broker.Message, routingKey string, userID string, sessionID string) SetMessageHandler(handler func(msg *BrokerConsumerMessage, routingKey string, userID string, sessionID string)) BrokerConsumerI GetClientProducer() producer.BrokerProducerI AddClientProducer(producer producer.BrokerProducerI) }
A Consumer belongs to a broker and consumes messages from a queue
func NewBrokerAliceConsumer ¶
func NewBrokerAliceConsumer(consumer alice.Consumer, routingKeyStore keyvaluestore.Interface, serviceName string) BrokerConsumerI
type BrokerConsumerMessage ¶
BrokerConsumerMessage describes the message to be handled by the message consumer
Click to show internal directories.
Click to hide internal directories.