update messaging proto

This commit is contained in:
Chris Lu 2020-04-16 03:29:57 -07:00
parent f5a748d33c
commit 508f3490a0
3 changed files with 360 additions and 133 deletions

View file

@ -14,7 +14,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/util/log_buffer"
)
func (broker *MessageBroker) Subscribe(request *messaging_pb.SubscribeRequest, server messaging_pb.SeaweedMessaging_SubscribeServer) error {
func (broker *MessageBroker) Subscribe(server messaging_pb.SeaweedMessaging_SubscribeServer) error {
panic("implement me")
}
@ -28,14 +28,16 @@ func (broker *MessageBroker) Publish(stream messaging_pb.SeaweedMessaging_Publis
if err != nil {
return err
}
namespace, topic, partition := in.Namespace, in.Topic, in.Partition
namespace, topic, partition := in.Init.Namespace, in.Init.Topic, in.Init.Partition
updatesChan := make(chan int32)
go func() {
for update := range updatesChan {
if err := stream.Send(&messaging_pb.PublishResponse{
PartitionCount: update,
Config: &messaging_pb.PublishResponse_ConfigMessage{
PartitionCount: update,
},
}); err != nil {
glog.V(0).Infof("err sending publish response: %v", err)
return
@ -73,9 +75,9 @@ func (broker *MessageBroker) Publish(stream messaging_pb.SeaweedMessaging_Publis
m := &messaging_pb.Message{
Timestamp: time.Now().UnixNano(),
Key: in.Key,
Value: in.Value,
Headers: in.Headers,
Key: in.Data.Key,
Value: in.Data.Value,
Headers: in.Data.Headers,
}
data, err := proto.Marshal(m)
@ -84,7 +86,7 @@ func (broker *MessageBroker) Publish(stream messaging_pb.SeaweedMessaging_Publis
continue
}
logBuffer.AddToBuffer(in.Key, data)
logBuffer.AddToBuffer(in.Data.Key, data)
}
}

View file

@ -9,7 +9,7 @@ option java_outer_classname = "MessagingProto";
service SeaweedMessaging {
rpc Subscribe (SubscribeRequest) returns (stream Message) {
rpc Subscribe (stream SubscriberMessage) returns (stream BrokerMessage) {
}
rpc Publish (stream PublishRequest) returns (stream PublishResponse) {
@ -25,17 +25,25 @@ service SeaweedMessaging {
//////////////////////////////////////////////////
message SubscribeRequest {
string namespace = 1;
string topic = 2;
int32 partition = 3;
enum StartPosition {
LATEST = 0; // Start at the newest message
EARLIEST = 1; // Start at the oldest message
TIMESTAMP = 2; // Start after a specified timestamp, exclusive
message SubscriberMessage {
message InitMessage {
string namespace = 1;
string topic = 2;
int32 partition = 3;
enum StartPosition {
LATEST = 0; // Start at the newest message
EARLIEST = 1; // Start at the oldest message
TIMESTAMP = 2; // Start after a specified timestamp, exclusive
}
StartPosition startPosition = 4; // Where to begin consuming from
int64 timestampNs = 5; // timestamp in nano seconds
string subscriber_id = 6; // uniquely identify a subscriber to track consumption
}
StartPosition startPosition = 4; // Where to begin consuming from
int64 timestampNs = 5; // timestamp in nano seconds
InitMessage init = 1;
message AckMessage {
int64 message_id = 1;
}
AckMessage ack = 2;
}
message Message {
@ -45,17 +53,38 @@ message Message {
map<string, bytes> headers = 4; // Message headers
}
message BrokerMessage {
Message data = 1;
message RedirectMessage {
string new_broker = 1;
}
RedirectMessage redirect = 2;
}
message PublishRequest {
string namespace = 1; // only needed on the initial request
string topic = 2; // only needed on the initial request
int32 partition = 4;
bytes key = 5; // Message key
bytes value = 6; // Message payload
map<string, bytes> headers = 7; // Message headers
message InitMessage {
string namespace = 1; // only needed on the initial request
string topic = 2; // only needed on the initial request
int32 partition = 3;
}
InitMessage init = 1;
message DataMessage {
bytes key = 1; // Message key
bytes value = 2; // Message payload
map<string, bytes> headers = 3; // Message headers
}
DataMessage data = 2;
}
message PublishResponse {
int32 partition_count = 1;
message ConfigMessage {
int32 partition_count = 1;
}
ConfigMessage config = 1;
message RedirectMessage {
string new_broker = 1;
}
RedirectMessage redirect = 2;
}
message ConfigureTopicRequest {

View file

@ -9,8 +9,9 @@ It is generated from these files:
messaging.proto
It has these top-level messages:
SubscribeRequest
SubscriberMessage
Message
BrokerMessage
PublishRequest
PublishResponse
ConfigureTopicRequest
@ -40,80 +41,130 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type SubscribeRequest_StartPosition int32
type SubscriberMessage_InitMessage_StartPosition int32
const (
SubscribeRequest_LATEST SubscribeRequest_StartPosition = 0
SubscribeRequest_EARLIEST SubscribeRequest_StartPosition = 1
SubscribeRequest_TIMESTAMP SubscribeRequest_StartPosition = 2
SubscriberMessage_InitMessage_LATEST SubscriberMessage_InitMessage_StartPosition = 0
SubscriberMessage_InitMessage_EARLIEST SubscriberMessage_InitMessage_StartPosition = 1
SubscriberMessage_InitMessage_TIMESTAMP SubscriberMessage_InitMessage_StartPosition = 2
)
var SubscribeRequest_StartPosition_name = map[int32]string{
var SubscriberMessage_InitMessage_StartPosition_name = map[int32]string{
0: "LATEST",
1: "EARLIEST",
2: "TIMESTAMP",
}
var SubscribeRequest_StartPosition_value = map[string]int32{
var SubscriberMessage_InitMessage_StartPosition_value = map[string]int32{
"LATEST": 0,
"EARLIEST": 1,
"TIMESTAMP": 2,
}
func (x SubscribeRequest_StartPosition) String() string {
return proto.EnumName(SubscribeRequest_StartPosition_name, int32(x))
func (x SubscriberMessage_InitMessage_StartPosition) String() string {
return proto.EnumName(SubscriberMessage_InitMessage_StartPosition_name, int32(x))
}
func (SubscribeRequest_StartPosition) EnumDescriptor() ([]byte, []int) {
func (SubscriberMessage_InitMessage_StartPosition) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0, 0}
}
type SubscriberMessage struct {
Init *SubscriberMessage_InitMessage `protobuf:"bytes,1,opt,name=init" json:"init,omitempty"`
Ack *SubscriberMessage_AckMessage `protobuf:"bytes,2,opt,name=ack" json:"ack,omitempty"`
}
func (m *SubscriberMessage) Reset() { *m = SubscriberMessage{} }
func (m *SubscriberMessage) String() string { return proto.CompactTextString(m) }
func (*SubscriberMessage) ProtoMessage() {}
func (*SubscriberMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *SubscriberMessage) GetInit() *SubscriberMessage_InitMessage {
if m != nil {
return m.Init
}
return nil
}
func (m *SubscriberMessage) GetAck() *SubscriberMessage_AckMessage {
if m != nil {
return m.Ack
}
return nil
}
type SubscriberMessage_InitMessage struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
Partition int32 `protobuf:"varint,3,opt,name=partition" json:"partition,omitempty"`
StartPosition SubscriberMessage_InitMessage_StartPosition `protobuf:"varint,4,opt,name=startPosition,enum=messaging_pb.SubscriberMessage_InitMessage_StartPosition" json:"startPosition,omitempty"`
TimestampNs int64 `protobuf:"varint,5,opt,name=timestampNs" json:"timestampNs,omitempty"`
SubscriberId string `protobuf:"bytes,6,opt,name=subscriber_id,json=subscriberId" json:"subscriber_id,omitempty"`
}
func (m *SubscriberMessage_InitMessage) Reset() { *m = SubscriberMessage_InitMessage{} }
func (m *SubscriberMessage_InitMessage) String() string { return proto.CompactTextString(m) }
func (*SubscriberMessage_InitMessage) ProtoMessage() {}
func (*SubscriberMessage_InitMessage) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
type SubscribeRequest struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
Partition int32 `protobuf:"varint,3,opt,name=partition" json:"partition,omitempty"`
StartPosition SubscribeRequest_StartPosition `protobuf:"varint,4,opt,name=startPosition,enum=messaging_pb.SubscribeRequest_StartPosition" json:"startPosition,omitempty"`
TimestampNs int64 `protobuf:"varint,5,opt,name=timestampNs" json:"timestampNs,omitempty"`
}
func (m *SubscribeRequest) Reset() { *m = SubscribeRequest{} }
func (m *SubscribeRequest) String() string { return proto.CompactTextString(m) }
func (*SubscribeRequest) ProtoMessage() {}
func (*SubscribeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *SubscribeRequest) GetNamespace() string {
func (m *SubscriberMessage_InitMessage) GetNamespace() string {
if m != nil {
return m.Namespace
}
return ""
}
func (m *SubscribeRequest) GetTopic() string {
func (m *SubscriberMessage_InitMessage) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *SubscribeRequest) GetPartition() int32 {
func (m *SubscriberMessage_InitMessage) GetPartition() int32 {
if m != nil {
return m.Partition
}
return 0
}
func (m *SubscribeRequest) GetStartPosition() SubscribeRequest_StartPosition {
func (m *SubscriberMessage_InitMessage) GetStartPosition() SubscriberMessage_InitMessage_StartPosition {
if m != nil {
return m.StartPosition
}
return SubscribeRequest_LATEST
return SubscriberMessage_InitMessage_LATEST
}
func (m *SubscribeRequest) GetTimestampNs() int64 {
func (m *SubscriberMessage_InitMessage) GetTimestampNs() int64 {
if m != nil {
return m.TimestampNs
}
return 0
}
func (m *SubscriberMessage_InitMessage) GetSubscriberId() string {
if m != nil {
return m.SubscriberId
}
return ""
}
type SubscriberMessage_AckMessage struct {
MessageId int64 `protobuf:"varint,1,opt,name=message_id,json=messageId" json:"message_id,omitempty"`
}
func (m *SubscriberMessage_AckMessage) Reset() { *m = SubscriberMessage_AckMessage{} }
func (m *SubscriberMessage_AckMessage) String() string { return proto.CompactTextString(m) }
func (*SubscriberMessage_AckMessage) ProtoMessage() {}
func (*SubscriberMessage_AckMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 1} }
func (m *SubscriberMessage_AckMessage) GetMessageId() int64 {
if m != nil {
return m.MessageId
}
return 0
}
type Message struct {
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"`
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
@ -154,56 +205,130 @@ func (m *Message) GetHeaders() map[string][]byte {
return nil
}
type BrokerMessage struct {
Data *Message `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
Redirect *BrokerMessage_RedirectMessage `protobuf:"bytes,2,opt,name=redirect" json:"redirect,omitempty"`
}
func (m *BrokerMessage) Reset() { *m = BrokerMessage{} }
func (m *BrokerMessage) String() string { return proto.CompactTextString(m) }
func (*BrokerMessage) ProtoMessage() {}
func (*BrokerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *BrokerMessage) GetData() *Message {
if m != nil {
return m.Data
}
return nil
}
func (m *BrokerMessage) GetRedirect() *BrokerMessage_RedirectMessage {
if m != nil {
return m.Redirect
}
return nil
}
type BrokerMessage_RedirectMessage struct {
NewBroker string `protobuf:"bytes,1,opt,name=new_broker,json=newBroker" json:"new_broker,omitempty"`
}
func (m *BrokerMessage_RedirectMessage) Reset() { *m = BrokerMessage_RedirectMessage{} }
func (m *BrokerMessage_RedirectMessage) String() string { return proto.CompactTextString(m) }
func (*BrokerMessage_RedirectMessage) ProtoMessage() {}
func (*BrokerMessage_RedirectMessage) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{2, 0}
}
func (m *BrokerMessage_RedirectMessage) GetNewBroker() string {
if m != nil {
return m.NewBroker
}
return ""
}
type PublishRequest struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
Partition int32 `protobuf:"varint,4,opt,name=partition" json:"partition,omitempty"`
Key []byte `protobuf:"bytes,5,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,6,opt,name=value,proto3" json:"value,omitempty"`
Headers map[string][]byte `protobuf:"bytes,7,rep,name=headers" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
Init *PublishRequest_InitMessage `protobuf:"bytes,1,opt,name=init" json:"init,omitempty"`
Data *PublishRequest_DataMessage `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
}
func (m *PublishRequest) Reset() { *m = PublishRequest{} }
func (m *PublishRequest) String() string { return proto.CompactTextString(m) }
func (*PublishRequest) ProtoMessage() {}
func (*PublishRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (*PublishRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *PublishRequest) GetNamespace() string {
func (m *PublishRequest) GetInit() *PublishRequest_InitMessage {
if m != nil {
return m.Init
}
return nil
}
func (m *PublishRequest) GetData() *PublishRequest_DataMessage {
if m != nil {
return m.Data
}
return nil
}
type PublishRequest_InitMessage struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
Partition int32 `protobuf:"varint,3,opt,name=partition" json:"partition,omitempty"`
}
func (m *PublishRequest_InitMessage) Reset() { *m = PublishRequest_InitMessage{} }
func (m *PublishRequest_InitMessage) String() string { return proto.CompactTextString(m) }
func (*PublishRequest_InitMessage) ProtoMessage() {}
func (*PublishRequest_InitMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} }
func (m *PublishRequest_InitMessage) GetNamespace() string {
if m != nil {
return m.Namespace
}
return ""
}
func (m *PublishRequest) GetTopic() string {
func (m *PublishRequest_InitMessage) GetTopic() string {
if m != nil {
return m.Topic
}
return ""
}
func (m *PublishRequest) GetPartition() int32 {
func (m *PublishRequest_InitMessage) GetPartition() int32 {
if m != nil {
return m.Partition
}
return 0
}
func (m *PublishRequest) GetKey() []byte {
type PublishRequest_DataMessage struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Headers map[string][]byte `protobuf:"bytes,3,rep,name=headers" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *PublishRequest_DataMessage) Reset() { *m = PublishRequest_DataMessage{} }
func (m *PublishRequest_DataMessage) String() string { return proto.CompactTextString(m) }
func (*PublishRequest_DataMessage) ProtoMessage() {}
func (*PublishRequest_DataMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 1} }
func (m *PublishRequest_DataMessage) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *PublishRequest) GetValue() []byte {
func (m *PublishRequest_DataMessage) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
func (m *PublishRequest) GetHeaders() map[string][]byte {
func (m *PublishRequest_DataMessage) GetHeaders() map[string][]byte {
if m != nil {
return m.Headers
}
@ -211,21 +336,65 @@ func (m *PublishRequest) GetHeaders() map[string][]byte {
}
type PublishResponse struct {
PartitionCount int32 `protobuf:"varint,1,opt,name=partition_count,json=partitionCount" json:"partition_count,omitempty"`
Config *PublishResponse_ConfigMessage `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"`
Redirect *PublishResponse_RedirectMessage `protobuf:"bytes,2,opt,name=redirect" json:"redirect,omitempty"`
}
func (m *PublishResponse) Reset() { *m = PublishResponse{} }
func (m *PublishResponse) String() string { return proto.CompactTextString(m) }
func (*PublishResponse) ProtoMessage() {}
func (*PublishResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (*PublishResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *PublishResponse) GetPartitionCount() int32 {
func (m *PublishResponse) GetConfig() *PublishResponse_ConfigMessage {
if m != nil {
return m.Config
}
return nil
}
func (m *PublishResponse) GetRedirect() *PublishResponse_RedirectMessage {
if m != nil {
return m.Redirect
}
return nil
}
type PublishResponse_ConfigMessage struct {
PartitionCount int32 `protobuf:"varint,1,opt,name=partition_count,json=partitionCount" json:"partition_count,omitempty"`
}
func (m *PublishResponse_ConfigMessage) Reset() { *m = PublishResponse_ConfigMessage{} }
func (m *PublishResponse_ConfigMessage) String() string { return proto.CompactTextString(m) }
func (*PublishResponse_ConfigMessage) ProtoMessage() {}
func (*PublishResponse_ConfigMessage) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{4, 0}
}
func (m *PublishResponse_ConfigMessage) GetPartitionCount() int32 {
if m != nil {
return m.PartitionCount
}
return 0
}
type PublishResponse_RedirectMessage struct {
NewBroker string `protobuf:"bytes,1,opt,name=new_broker,json=newBroker" json:"new_broker,omitempty"`
}
func (m *PublishResponse_RedirectMessage) Reset() { *m = PublishResponse_RedirectMessage{} }
func (m *PublishResponse_RedirectMessage) String() string { return proto.CompactTextString(m) }
func (*PublishResponse_RedirectMessage) ProtoMessage() {}
func (*PublishResponse_RedirectMessage) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{4, 1}
}
func (m *PublishResponse_RedirectMessage) GetNewBroker() string {
if m != nil {
return m.NewBroker
}
return ""
}
type ConfigureTopicRequest struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
@ -236,7 +405,7 @@ type ConfigureTopicRequest struct {
func (m *ConfigureTopicRequest) Reset() { *m = ConfigureTopicRequest{} }
func (m *ConfigureTopicRequest) String() string { return proto.CompactTextString(m) }
func (*ConfigureTopicRequest) ProtoMessage() {}
func (*ConfigureTopicRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (*ConfigureTopicRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *ConfigureTopicRequest) GetNamespace() string {
if m != nil {
@ -272,7 +441,7 @@ type ConfigureTopicResponse struct {
func (m *ConfigureTopicResponse) Reset() { *m = ConfigureTopicResponse{} }
func (m *ConfigureTopicResponse) String() string { return proto.CompactTextString(m) }
func (*ConfigureTopicResponse) ProtoMessage() {}
func (*ConfigureTopicResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (*ConfigureTopicResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
type GetTopicConfigurationRequest struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
@ -282,7 +451,7 @@ type GetTopicConfigurationRequest struct {
func (m *GetTopicConfigurationRequest) Reset() { *m = GetTopicConfigurationRequest{} }
func (m *GetTopicConfigurationRequest) String() string { return proto.CompactTextString(m) }
func (*GetTopicConfigurationRequest) ProtoMessage() {}
func (*GetTopicConfigurationRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (*GetTopicConfigurationRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *GetTopicConfigurationRequest) GetNamespace() string {
if m != nil {
@ -305,7 +474,7 @@ type GetTopicConfigurationResponse struct {
func (m *GetTopicConfigurationResponse) Reset() { *m = GetTopicConfigurationResponse{} }
func (m *GetTopicConfigurationResponse) String() string { return proto.CompactTextString(m) }
func (*GetTopicConfigurationResponse) ProtoMessage() {}
func (*GetTopicConfigurationResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (*GetTopicConfigurationResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *GetTopicConfigurationResponse) GetPartitions() int32 {
if m != nil {
@ -315,15 +484,23 @@ func (m *GetTopicConfigurationResponse) GetPartitions() int32 {
}
func init() {
proto.RegisterType((*SubscribeRequest)(nil), "messaging_pb.SubscribeRequest")
proto.RegisterType((*SubscriberMessage)(nil), "messaging_pb.SubscriberMessage")
proto.RegisterType((*SubscriberMessage_InitMessage)(nil), "messaging_pb.SubscriberMessage.InitMessage")
proto.RegisterType((*SubscriberMessage_AckMessage)(nil), "messaging_pb.SubscriberMessage.AckMessage")
proto.RegisterType((*Message)(nil), "messaging_pb.Message")
proto.RegisterType((*BrokerMessage)(nil), "messaging_pb.BrokerMessage")
proto.RegisterType((*BrokerMessage_RedirectMessage)(nil), "messaging_pb.BrokerMessage.RedirectMessage")
proto.RegisterType((*PublishRequest)(nil), "messaging_pb.PublishRequest")
proto.RegisterType((*PublishRequest_InitMessage)(nil), "messaging_pb.PublishRequest.InitMessage")
proto.RegisterType((*PublishRequest_DataMessage)(nil), "messaging_pb.PublishRequest.DataMessage")
proto.RegisterType((*PublishResponse)(nil), "messaging_pb.PublishResponse")
proto.RegisterType((*PublishResponse_ConfigMessage)(nil), "messaging_pb.PublishResponse.ConfigMessage")
proto.RegisterType((*PublishResponse_RedirectMessage)(nil), "messaging_pb.PublishResponse.RedirectMessage")
proto.RegisterType((*ConfigureTopicRequest)(nil), "messaging_pb.ConfigureTopicRequest")
proto.RegisterType((*ConfigureTopicResponse)(nil), "messaging_pb.ConfigureTopicResponse")
proto.RegisterType((*GetTopicConfigurationRequest)(nil), "messaging_pb.GetTopicConfigurationRequest")
proto.RegisterType((*GetTopicConfigurationResponse)(nil), "messaging_pb.GetTopicConfigurationResponse")
proto.RegisterEnum("messaging_pb.SubscribeRequest_StartPosition", SubscribeRequest_StartPosition_name, SubscribeRequest_StartPosition_value)
proto.RegisterEnum("messaging_pb.SubscriberMessage_InitMessage_StartPosition", SubscriberMessage_InitMessage_StartPosition_name, SubscriberMessage_InitMessage_StartPosition_value)
}
// Reference imports to suppress errors if they are not otherwise used.
@ -337,7 +514,7 @@ const _ = grpc.SupportPackageIsVersion4
// Client API for SeaweedMessaging service
type SeaweedMessagingClient interface {
Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error)
Subscribe(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error)
Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error)
ConfigureTopic(ctx context.Context, in *ConfigureTopicRequest, opts ...grpc.CallOption) (*ConfigureTopicResponse, error)
GetTopicConfiguration(ctx context.Context, in *GetTopicConfigurationRequest, opts ...grpc.CallOption) (*GetTopicConfigurationResponse, error)
@ -351,23 +528,18 @@ func NewSeaweedMessagingClient(cc *grpc.ClientConn) SeaweedMessagingClient {
return &seaweedMessagingClient{cc}
}
func (c *seaweedMessagingClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error) {
func (c *seaweedMessagingClient) Subscribe(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error) {
stream, err := grpc.NewClientStream(ctx, &_SeaweedMessaging_serviceDesc.Streams[0], c.cc, "/messaging_pb.SeaweedMessaging/Subscribe", opts...)
if err != nil {
return nil, err
}
x := &seaweedMessagingSubscribeClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type SeaweedMessaging_SubscribeClient interface {
Recv() (*Message, error)
Send(*SubscriberMessage) error
Recv() (*BrokerMessage, error)
grpc.ClientStream
}
@ -375,8 +547,12 @@ type seaweedMessagingSubscribeClient struct {
grpc.ClientStream
}
func (x *seaweedMessagingSubscribeClient) Recv() (*Message, error) {
m := new(Message)
func (x *seaweedMessagingSubscribeClient) Send(m *SubscriberMessage) error {
return x.ClientStream.SendMsg(m)
}
func (x *seaweedMessagingSubscribeClient) Recv() (*BrokerMessage, error) {
m := new(BrokerMessage)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
@ -435,7 +611,7 @@ func (c *seaweedMessagingClient) GetTopicConfiguration(ctx context.Context, in *
// Server API for SeaweedMessaging service
type SeaweedMessagingServer interface {
Subscribe(*SubscribeRequest, SeaweedMessaging_SubscribeServer) error
Subscribe(SeaweedMessaging_SubscribeServer) error
Publish(SeaweedMessaging_PublishServer) error
ConfigureTopic(context.Context, *ConfigureTopicRequest) (*ConfigureTopicResponse, error)
GetTopicConfiguration(context.Context, *GetTopicConfigurationRequest) (*GetTopicConfigurationResponse, error)
@ -446,15 +622,12 @@ func RegisterSeaweedMessagingServer(s *grpc.Server, srv SeaweedMessagingServer)
}
func _SeaweedMessaging_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SubscribeRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(SeaweedMessagingServer).Subscribe(m, &seaweedMessagingSubscribeServer{stream})
return srv.(SeaweedMessagingServer).Subscribe(&seaweedMessagingSubscribeServer{stream})
}
type SeaweedMessaging_SubscribeServer interface {
Send(*Message) error
Send(*BrokerMessage) error
Recv() (*SubscriberMessage, error)
grpc.ServerStream
}
@ -462,10 +635,18 @@ type seaweedMessagingSubscribeServer struct {
grpc.ServerStream
}
func (x *seaweedMessagingSubscribeServer) Send(m *Message) error {
func (x *seaweedMessagingSubscribeServer) Send(m *BrokerMessage) error {
return x.ServerStream.SendMsg(m)
}
func (x *seaweedMessagingSubscribeServer) Recv() (*SubscriberMessage, error) {
m := new(SubscriberMessage)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _SeaweedMessaging_Publish_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(SeaweedMessagingServer).Publish(&seaweedMessagingPublishServer{stream})
}
@ -546,6 +727,7 @@ var _SeaweedMessaging_serviceDesc = grpc.ServiceDesc{
StreamName: "Subscribe",
Handler: _SeaweedMessaging_Subscribe_Handler,
ServerStreams: true,
ClientStreams: true,
},
{
StreamName: "Publish",
@ -560,42 +742,56 @@ var _SeaweedMessaging_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("messaging.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 586 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x95, 0xdb, 0x8b, 0xda, 0x4e,
0x14, 0xc7, 0x9d, 0xc4, 0xcb, 0x2f, 0x67, 0xbd, 0x31, 0xfc, 0x2c, 0x41, 0x5c, 0x09, 0x69, 0xa1,
0xe9, 0x85, 0x20, 0xf6, 0x65, 0x91, 0x42, 0x51, 0xb1, 0xed, 0x82, 0x16, 0x19, 0x7d, 0x2d, 0x4b,
0xcc, 0xce, 0xba, 0xa1, 0x9a, 0xa4, 0x99, 0x49, 0xcb, 0xfe, 0x0d, 0x7d, 0xdd, 0x7f, 0xab, 0x7f,
0x51, 0x5f, 0x4a, 0xae, 0x26, 0x92, 0x95, 0xd2, 0xcb, 0x5b, 0xe6, 0x3b, 0x67, 0xce, 0xf7, 0x9c,
0xcf, 0x49, 0x26, 0xd0, 0xda, 0x53, 0xc6, 0x8c, 0xad, 0x65, 0x6f, 0x75, 0xd7, 0x73,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 0xd7, 0x0e, 0x35, 0xbe, 0x52, 0x7a, 0xbd, 0x48, 0x46, 0x8f, 0xdf, 0x82, 0x94, 0xde,
0x00, 0xb8, 0x7f, 0xfa, 0x6a, 0xe8, 0x76, 0x0a, 0x3f, 0x1d, 0xb5, 0x34, 0x40, 0x78, 0x0e, 0xb5,
0x78, 0xbc, 0xb8, 0x77, 0xea, 0xcd, 0xea, 0x9e, 0x3f, 0xb0, 0x1b, 0x93, 0x2b, 0x69, 0x68, 0x80,
0xf0, 0x47, 0x68, 0xe6, 0xc9, 0xe2, 0xc7, 0xf9, 0x63, 0x85, 0x6f, 0x43, 0xf7, 0xc9, 0xe9, 0xa0,
0xc4, 0x02, 0x7b, 0xd0, 0x29, 0x44, 0x89, 0x9f, 0xe7, 0x13, 0x9c, 0x9a, 0x61, 0xf7, 0xc5, 0x2f,
0xc5, 0x26, 0x9e, 0x13, 0x15, 0xda, 0x2c, 0x82, 0x7f, 0xc3, 0x74, 0x73, 0x67, 0x51, 0x9b, 0x4f,
0x9a, 0xe9, 0x1c, 0x96, 0xc1, 0x6f, 0x62, 0x53, 0x0d, 0xff, 0x16, 0xaf, 0x7e, 0x06, 0x00, 0x00,
0xff, 0xff, 0x83, 0x4f, 0x5b, 0x91, 0x40, 0x06, 0x00, 0x00,
// 802 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x56, 0x5d, 0x4f, 0xdb, 0x48,
0x14, 0xc5, 0x76, 0x12, 0xf0, 0xcd, 0xe7, 0x8e, 0x96, 0x55, 0xe4, 0x05, 0x36, 0x32, 0x2b, 0x6d,
0xb6, 0xa8, 0x16, 0x4a, 0x55, 0x89, 0x22, 0x24, 0x94, 0xd0, 0x88, 0x46, 0x22, 0x25, 0x9a, 0xe4,
0xb5, 0x8a, 0x26, 0xce, 0x00, 0x56, 0x12, 0x3b, 0xf5, 0x4c, 0x8a, 0x78, 0x6e, 0x5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