-
Notifications
You must be signed in to change notification settings - Fork 11
feat(*): Updates messaging to support request-reply #21
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
interface producer { | ||
use messaging-types.{client, channel, message, error}; | ||
|
||
/// Sends a message to the given channel/topic. This topic can be overridden if a message has a | ||
/// non-empty topic field | ||
send: func(c: client, ch: channel, m: list<message>) -> result<_, error>; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,22 +23,15 @@ interface messaging-types { | |
extensions: option<list<tuple<string, string>>> | ||
} | ||
|
||
/// Format specification for messages | ||
/// - more info: https://github.com/clemensv/spec/blob/registry-extensions/registry/spec.md#message-formats | ||
/// - message metadata can further decorate w/ things like format version, and so on. | ||
enum format-spec { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm...I think agree with that second comment that this should be a either a bare string or at least called |
||
cloudevents, | ||
http, | ||
amqp, | ||
mqtt, | ||
kafka, | ||
raw | ||
} | ||
|
||
/// A message with a binary payload, a format specification, and decorative metadata. | ||
/// A message with a binary payload and additional information | ||
record message { | ||
/// The topic or subject this message was received or should be sent on | ||
topic: string, | ||
/// An optional topic for use in request/response scenarios | ||
reply-to: option<string>, | ||
/// An opaque blob of data | ||
data: list<u8>, | ||
format: format-spec, | ||
/// Optional metadata (also called headers or attributes in some systems) attached to the message | ||
metadata: option<list<tuple<string, string>>> | ||
} | ||
} |
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.
Adding support for
request-reply
was rejected during our stakeholder review - here's a relevant comment explaining why: #8 (comment)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.
So I missed that when I was digging around. However, I think I need to do some more thinking on the reasoning there. I understand the motivation as described there for not adding it, but based on everything I've seen in real usage of the wasmcloud messaging interface and in my review of most of the common messaging systems, request/reply showed up everywhere. Let me do some more reading and come back to this, because, like you mentioned, this should reflect real world usage