rename functions

This commit is contained in:
chrislu 2024-01-05 17:10:43 -08:00
parent d9bd343055
commit d0d24f1e40
2 changed files with 3 additions and 3 deletions

View file

@ -21,12 +21,12 @@ func (p *TopicPublisher) doConnect(partition *mq_pb.Partition, brokerAddress str
return publishClient, fmt.Errorf("dial broker %s: %v", brokerAddress, err) return publishClient, fmt.Errorf("dial broker %s: %v", brokerAddress, err)
} }
brokerClient := mq_pb.NewSeaweedMessagingClient(grpcConnection) brokerClient := mq_pb.NewSeaweedMessagingClient(grpcConnection)
stream, err := brokerClient.SubscribeMessage(context.Background()) stream, err := brokerClient.PublishMessage(context.Background())
if err != nil { if err != nil {
return publishClient, fmt.Errorf("create publish client: %v", err) return publishClient, fmt.Errorf("create publish client: %v", err)
} }
publishClient = &PublishClient{ publishClient = &PublishClient{
SeaweedMessaging_PublishClient: stream, SeaweedMessaging_PublishMessageClient: stream,
Broker: brokerAddress, Broker: brokerAddress,
} }
if err = publishClient.Send(&mq_pb.PublishMessageRequest{ if err = publishClient.Send(&mq_pb.PublishMessageRequest{

View file

@ -17,7 +17,7 @@ type PublisherConfiguration struct {
} }
type PublishClient struct { type PublishClient struct {
mq_pb.SeaweedMessaging_PublishClient mq_pb.SeaweedMessaging_PublishMessageClient
Broker string Broker string
Err error Err error
} }