You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
378 B
13 lines
378 B
package kafka
|
|
|
|
import "github.com/segmentio/kafka-go"
|
|
|
|
// Собственный балансировщик для определения номера партиции
|
|
// в которую попадет очередное сообщение
|
|
type MyBalancer struct {
|
|
Cool bool
|
|
}
|
|
|
|
func (s *MyBalancer) Balance(msg kafka.Message, partitions ...int) (partition int) {
|
|
return 0
|
|
}
|
|
|