aboutsummaryrefslogtreecommitdiff
path: root/weed/mq/client/pub_client/publish.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mq/client/pub_client/publish.go')
-rw-r--r--weed/mq/client/pub_client/publish.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/mq/client/pub_client/publish.go b/weed/mq/client/pub_client/publish.go
index 1e250ede3..4b0dfade9 100644
--- a/weed/mq/client/pub_client/publish.go
+++ b/weed/mq/client/pub_client/publish.go
@@ -12,7 +12,7 @@ func (p *TopicPublisher) Publish(key, value []byte) error {
if hashKey < 0 {
hashKey = -hashKey
}
- publishClient, found := p.partition2Broker.Floor(hashKey, hashKey)
+ publishClient, found := p.partition2Broker.Floor(hashKey+1, hashKey+1)
if !found {
return fmt.Errorf("no broker found for key %d", hashKey)
}
@@ -27,8 +27,8 @@ func (p *TopicPublisher) Publish(key, value []byte) error {
//google.golang.org/grpc.(*clientStream).SendMsg(stream.go:894)
//github.com/seaweedfs/seaweedfs/weed/pb/mq_pb.(*seaweedMessagingPublishClient).Send(mq_grpc.pb.go:141)
//github.com/seaweedfs/seaweedfs/weed/mq/client/pub_client.(*TopicPublisher).Publish(publish.go:19)
- if err := publishClient.Send(&mq_pb.PublishRequest{
- Message: &mq_pb.PublishRequest_Data{
+ if err := publishClient.Send(&mq_pb.PublishMessageRequest{
+ Message: &mq_pb.PublishMessageRequest_Data{
Data: &mq_pb.DataMessage{
Key: key,
Value: value,