-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: QOS Ack Implementation #93
Conversation
- make `SupportsTransaction` easier to read - add missing message type for `TestMessageTypeSupportsTransaction` - add `SupportsQOSAck` - add `TestMessageTypeSupportsQOSAck` - improve readability for `SupportsTransaction` and add missing message type case `lastMessageType` - update error message
Codecov Report
@@ Coverage Diff @@
## main #93 +/- ##
==========================================
+ Coverage 51.02% 51.06% +0.03%
==========================================
Files 24 24
Lines 3953 3956 +3
==========================================
+ Hits 2017 2020 +3
Misses 1760 1760
Partials 176 176
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -201,6 +201,22 @@ func (msg *Message) TransactionKey() string { | |||
return msg.TransactionUUID | |||
} | |||
|
|||
// IsQOSAckPart determines whether or not a message can QOS ack. | |||
func (msg *Message) IsQOSAckPart() bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this to provide a quick way to check whether msgs are able to qos ack.
@@ -49,22 +49,22 @@ const ( | |||
// where applicable). | |||
func (mt MessageType) SupportsTransaction() bool { | |||
switch mt { | |||
case Invalid0MessageType: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking to see how we did similar things as SupportsTransaction
but then I noticed we can simplify it and improve readability
@@ -16,6 +16,13 @@ const ( | |||
// type determine what QOSLevel a message has. | |||
type QOSValue int | |||
|
|||
const ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found myself wanting a quick default values for the talaria qos implementation and I can imagine other users will too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good first approach! there's some things we probably want to evolve over the next few months, but this is a solid 1.0 version.
Kudos, SonarCloud Quality Gate passed! |
Related to xmidt-org/talaria#228 and xmidt-org/talaria#235
What this includes
SupportsTransaction
easier to readSupportsQOSAck
IsQOSAckPart
TestMessageTypeSupportsQOSAck
SupportsTransaction
and add missing message type caselastMessageType