diff --git a/examples.md b/examples.md
deleted file mode 100644
index e11bf3e..0000000
--- a/examples.md
+++ /dev/null
@@ -1,178 +0,0 @@
-# Examples
-
-## Example 1: Guest Skeleton Usage
-
-The guest will implement the methods in [`wit/guest.wit`](/wit/guest.wit):
-- `configure()`, which will be called by the host to setup long-lived subscriptions, and receive any other implementor specific extensions/config..
-- `handler()`, which will be called by the host to handle messages sent to the channels subscribed to in `configure()`.
-
-As Wasm modules/components are mostly intended to be short-lived, the host is meant to create new instances for configuration and each message handling.
-
-### Rust
-
-```rust
-use crate::messaging_types::{GuestConfigurationResult, MessageResult};
-
-wit_bindgen::generate!({
- path: "../wit",
-});
-
-struct MyGuest;
-
-impl guest::Guest for MyGuest {
- fn configure() -> Result
channels
: list<channel
>extensions
: option<list<(string
, string
)>>record message
A message with a binary payload and additional information
-topic
: channel
The topic/subject/channel this message was received or should be sent on -
An optional content-type describing the format of the data in the message. This is -sometimes described as the "format" type -
An optional topic for use in request/response scenarios. Senders and consumers of -messages must not assume that this field is set and should handle it in their code -accordingly. -
An opaque blob of data -
metadata
: option<list<(string
, string
)>>
Optional metadata (also called headers or attributes in some systems) attached to the -message -
resource message
[static]client.connect: func
[constructor]message: func
topic
: channel
data
: list<u8
>content-type
: option<string
>metadata
: option<list<(string
, string
)>>message
>[method]message.topic: func
The topic/subject/channel this message was received or should be sent on
+self
: borrow<message
>channel
[method]message.content-type: func
An optional content-type describing the format of the data in the message. This is +sometimes described as the "format" type
+self
: borrow<message
>[method]message.data: func
An opaque blob of data
+self
: borrow<message
>[method]message.metadata: func
Optional metadata (also called headers or attributes in some systems) attached to the +message
+self
: borrow<message
>[method]message.complete: func
Completes/acks the message
+A message can exist under several statuses: +(1) available: the message is ready to be read, +(2) acquired: the message has been sent to a consumer (but still exists in the queue), +(3) accepted (result of complete): the message has been received and ACK-ed by a consumer and can be safely removed from the queue, +(4) rejected (result of abandon): the message has been received and NACK-ed by a consumer, at which point it can be:
+self
: borrow<message
>error
>[method]message.abandon: func
Abandon/nacks the message
+A message can exist under several statuses: +(1) available: the message is ready to be read, +(2) acquired: the message has been sent to a consumer (but still exists in the queue), +(3) accepted (result of complete): the message has been received and ACK-ed by a consumer and can be safely removed from the queue, +(4) rejected (result of abandon): the message has been received and NACK-ed by a consumer, at which point it can be:
+self
: borrow<message
>error
>The request-reply interface allows a guest to send a message and await a response. This interface is considered optional as not all message services support the concept of @@ -113,21 +179,28 @@ included it as a core interface.
request: func
Performs a blocking request/reply operation with an optional timeout. If the timeout value is not set, then the request/reply operation will block indefinitely.
-Please note that implementations that provide wasi:messaging
are responsible for ensuring
-that guests are not allowed to subscribe to channels that they are not configured to
-subscribe to (or have access to). Failure to do so can result in possible breakout or access
-to resources that are not intended to be accessible to the guest. This means implementations
-should validate that the reply-to field is a valid topic the guest should have access to or
-enforce it via the credentials used to connect to the service.
reply: func
Replies to the given message with the given response message. The details of which channel +the message is sent to is up to the implementation. This allows for reply to details to be +handled in the best way possible for the underlying messaging system.
+error
>The producer interface is used to send messages to a channel/topic.
@@ -154,28 +227,18 @@ override the channel/topic in the message.error
>The consumer interface allows a guest to dynamically update its subscriptions and configuration -as well as functionality for completing (acking) or abandoning (nacking) messages.
+The consumer interface allows a guest to dynamically update its subscriptions and configuration
type client
-#### `type message` -[`message`](#message) -
-#### `type channel` -[`channel`](#channel) -
-#### `type error` -[`error`](#error) +
type error
#### `type guest-configuration` [`guest-configuration`](#guest_configuration) @@ -203,31 +266,3 @@ enforce it via the credentials used to connect to the service.
error
>complete-message: func
A message can exist under several statuses: -(1) available: the message is ready to be read, -(2) acquired: the message has been sent to a consumer (but still exists in the queue), -(3) accepted (result of complete-message): the message has been received and ACK-ed by a consumer and can be safely removed from the queue, -(4) rejected (result of abandon-message): the message has been received and NACK-ed by a consumer, at which point it can be:
-m
: message
error
>abandon-message: func
m
: message
error
>channels
: list<channel
>extensions
: option<list<(string
, string
)>>record message
A message with a binary payload and additional information
-topic
: channel
The topic/subject/channel this message was received or should be sent on -
An optional content-type describing the format of the data in the message. This is -sometimes described as the "format" type -
An optional topic for use in request/response scenarios. Senders and consumers of -messages must not assume that this field is set and should handle it in their code -accordingly. -
An opaque blob of data -
metadata
: option<list<(string
, string
)>>
Optional metadata (also called headers or attributes in some systems) attached to the -message -
resource message
[static]client.connect: func
[constructor]message: func
topic
: channel
data
: list<u8
>content-type
: option<string
>metadata
: option<list<(string
, string
)>>message
>[method]message.topic: func
The topic/subject/channel this message was received or should be sent on
+self
: borrow<message
>channel
[method]message.content-type: func
An optional content-type describing the format of the data in the message. This is +sometimes described as the "format" type
+self
: borrow<message
>[method]message.data: func
An opaque blob of data
+self
: borrow<message
>[method]message.metadata: func
Optional metadata (also called headers or attributes in some systems) attached to the +message
+self
: borrow<message
>[method]message.complete: func
Completes/acks the message
+A message can exist under several statuses: +(1) available: the message is ready to be read, +(2) acquired: the message has been sent to a consumer (but still exists in the queue), +(3) accepted (result of complete): the message has been received and ACK-ed by a consumer and can be safely removed from the queue, +(4) rejected (result of abandon): the message has been received and NACK-ed by a consumer, at which point it can be:
+self
: borrow<message
>error
>[method]message.abandon: func
Abandon/nacks the message
+A message can exist under several statuses: +(1) available: the message is ready to be read, +(2) acquired: the message has been sent to a consumer (but still exists in the queue), +(3) accepted (result of complete): the message has been received and ACK-ed by a consumer and can be safely removed from the queue, +(4) rejected (result of abandon): the message has been received and NACK-ed by a consumer, at which point it can be:
+self
: borrow<message
>error
>The producer interface is used to send messages to a channel/topic.
error
>The consumer interface allows a guest to dynamically update its subscriptions and configuration -as well as functionality for completing (acking) or abandoning (nacking) messages.
+The consumer interface allows a guest to dynamically update its subscriptions and configuration
type client
-#### `type message` -[`message`](#message) -
-#### `type channel` -[`channel`](#channel) -
-#### `type error` -[`error`](#error) +
type error
#### `type guest-configuration` [`guest-configuration`](#guest_configuration) @@ -165,31 +221,3 @@ enforce it via the credentials used to connect to the service.
error
>complete-message: func
A message can exist under several statuses: -(1) available: the message is ready to be read, -(2) acquired: the message has been sent to a consumer (but still exists in the queue), -(3) accepted (result of complete-message): the message has been received and ACK-ed by a consumer and can be safely removed from the queue, -(4) rejected (result of abandon-message): the message has been received and NACK-ed by a consumer, at which point it can be:
-m
: message
error
>abandon-message: func
m
: message
error
>channels
: list<channel
>extensions
: option<list<(string
, string
)>>record message
A message with a binary payload and additional information
-topic
: channel
The topic/subject/channel this message was received or should be sent on -
An optional content-type describing the format of the data in the message. This is -sometimes described as the "format" type -
An optional topic for use in request/response scenarios. Senders and consumers of -messages must not assume that this field is set and should handle it in their code -accordingly. -
An opaque blob of data -
metadata
: option<list<(string
, string
)>>
Optional metadata (also called headers or attributes in some systems) attached to the -message -
resource message
[static]client.connect: func
[constructor]message: func
topic
: channel
data
: list<u8
>content-type
: option<string
>metadata
: option<list<(string
, string
)>>message
>[method]message.topic: func
The topic/subject/channel this message was received or should be sent on
+self
: borrow<message
>channel
[method]message.content-type: func
An optional content-type describing the format of the data in the message. This is +sometimes described as the "format" type
+self
: borrow<message
>[method]message.data: func
An opaque blob of data
+self
: borrow<message
>[method]message.metadata: func
Optional metadata (also called headers or attributes in some systems) attached to the +message
+self
: borrow<message
>[method]message.complete: func
Completes/acks the message
+A message can exist under several statuses: +(1) available: the message is ready to be read, +(2) acquired: the message has been sent to a consumer (but still exists in the queue), +(3) accepted (result of complete): the message has been received and ACK-ed by a consumer and can be safely removed from the queue, +(4) rejected (result of abandon): the message has been received and NACK-ed by a consumer, at which point it can be:
+self
: borrow<message
>error
>[method]message.abandon: func
Abandon/nacks the message
+A message can exist under several statuses: +(1) available: the message is ready to be read, +(2) acquired: the message has been sent to a consumer (but still exists in the queue), +(3) accepted (result of complete): the message has been received and ACK-ed by a consumer and can be safely removed from the queue, +(4) rejected (result of abandon): the message has been received and NACK-ed by a consumer, at which point it can be:
+self
: borrow<message
>error
>The producer interface is used to send messages to a channel/topic.
error
>The consumer interface allows a guest to dynamically update its subscriptions and configuration -as well as functionality for completing (acking) or abandoning (nacking) messages.
+The consumer interface allows a guest to dynamically update its subscriptions and configuration
type client
-#### `type message` -[`message`](#message) -
-#### `type channel` -[`channel`](#channel) -
-#### `type error` -[`error`](#error) +
type error
#### `type guest-configuration` [`guest-configuration`](#guest_configuration) @@ -170,34 +226,6 @@ enforce it via the credentials used to connect to the service.
error
>complete-message: func
A message can exist under several statuses: -(1) available: the message is ready to be read, -(2) acquired: the message has been sent to a consumer (but still exists in the queue), -(3) accepted (result of complete-message): the message has been received and ACK-ed by a consumer and can be safely removed from the queue, -(4) rejected (result of abandon-message): the message has been received and NACK-ed by a consumer, at which point it can be:
-m
: message
error
>abandon-message: func
m
: message
error
>handler: func
Whenever this guest receives a message in one of the subscribed channels, the message is -sent to this handler
+sent to this handler. The guest is responsible for matching on the channel and handling the +message accordingly.