Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize(host string, port int, prefix string, hasProducer bool, consumers []MessageConsumer)
Initialize : initializes the kafka producer/consumer.
func SendMessageToTopic ¶
func SendMessageToTopic(message, topic string)
SendMessageToTopic : sends a message to a topic.
Types ¶
type Client ¶
type Client struct { HasProducer bool Producer sarama.AsyncProducer ProducerSignals chan os.Signal TopicsPrefix string }
Client : a kafka client. Could be a message producer.
var Main *Client
Main : main client of the application.
func (*Client) Initialize ¶
func (client *Client) Initialize(host string, port int, prefix string, hasProducer bool, consumers []MessageConsumer)
Initialize initializes the kafka producer/consumer.
func (*Client) SendMessageToTopic ¶
SendMessageToTopic sends a message to a topic.
type MessageConsumer ¶
MessageConsumer : a message consumer consumes messages from a queue 'topic' and executes 'action'
Click to show internal directories.
Click to hide internal directories.