You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/06/24 03:46:01 UTC
[GitHub] [pulsar-client-go] wolfstudy opened a new issue #15: [Consumer &&
Message Impl] Thinking about some code design
wolfstudy opened a new issue #15: [Consumer && Message Impl] Thinking about some code design
URL: https://github.com/apache/pulsar-client-go/issues/15
hello @merlimat I am implementing the implementation of consumer and message related, there are several code design issues I want to communicate with you.
First: Is `Message` defined as struct more reasonable or as interface is more reasonable?
Second: Whether the `ConsumerMessage` struct can be replaced with a Message struct.
These two questions are related. For this, my idea is that we can define a Message as a struct that contains the fields that make up a message, for example:
```
type Message struct {
ID MessageID
Topic string
Properties map[string]string
Payload []byte
PublishTime time.Time
EventTime time.Time
Key string
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services