Skip to content

Conversation

yanmxa
Copy link
Contributor

@yanmxa yanmxa commented May 23, 2024

Signed-off-by: myan myan@redhat.com
Fixed: #1062

@yanmxa yanmxa requested a review from a team as a code owner May 23, 2024 06:37
@yanmxa yanmxa force-pushed the br_mqtt_stru branch 3 times, most recently from fdc7415 to ab4b6b9 Compare May 23, 2024 07:27
@yanmxa
Copy link
Contributor Author

yanmxa commented Jun 4, 2024

This is a bug of the MQTT protocol in the structured mode. Please take a look @embano1 ~

Copy link
Member

@embano1 embano1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit and a question

@@ -42,7 +41,7 @@ func NewMessage(msg *paho.Publish) *Message {
var v spec.Version
if msg.Properties != nil {
// Use properties.User["Content-type"] to determine if message is structured
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this comment be removed then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}
if err != nil {
return
}
}

contentType := m.internal.Properties.ContentType
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: no changes needed for structured encoding?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need it here, cause the attribute datacontenttype of the event is decoded from this field with a binary message

@yanmxa yanmxa force-pushed the br_mqtt_stru branch 2 times, most recently from 89a0e0f to 563be8b Compare June 11, 2024 05:17
Signed-off-by: myan <myan@redhat.com>
@embano1 embano1 enabled auto-merge June 14, 2024 06:08
Copy link
Member

@embano1 embano1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (merging once tests pass)

@embano1 embano1 merged commit 972dfc7 into cloudevents:main Jun 14, 2024
@yanmxa yanmxa deleted the br_mqtt_stru branch June 17, 2024 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The content-type for the MQTT protocol might have been set multiple times
2 participants