diff --git a/imports-request-reply.md b/imports-request-reply.md index d183745..17b01f3 100644 --- a/imports-request-reply.md +++ b/imports-request-reply.md @@ -45,12 +45,10 @@ action. This error is mainly used when calling `update-guest-configuration`.

The interface doesn't highlight this difference in the type itself as that's uniquely a consumer issue.

record guest-configuration

Configuration includes a required list of channels the guest is subscribing to, and an -optional list of extensions key-value pairs (e.g., partitions/offsets to read from in -Kafka/EventHubs, QoS etc.).

+optional list of extensions key-value pairs

Record Fields

resource message

A message with a binary payload and additional information

@@ -86,6 +84,13 @@ Kafka/EventHubs, QoS etc.).

+

[method]message.set-topic: func

+

Set the topic/subject/channel this message should be sent on

+
Params
+

[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

@@ -97,6 +102,14 @@ sometimes described as the "format" type

+

[method]message.set-content-type: func

+

Set the content-type describing the format of the data in the message. This is +sometimes described as the "format" type

+
Params
+

[method]message.data: func

An opaque blob of data

Params
@@ -107,6 +120,13 @@ sometimes described as the "format" type

+

[method]message.set-data: func

+

Set the opaque blob of data for this message, discarding the old value

+
Params
+

[method]message.metadata: func

Optional metadata (also called headers or attributes in some systems) attached to the message

@@ -118,6 +138,14 @@ message

+

[method]message.add-metadata: func

+

Add a new key-value pair to the metadata, overwriting any existing value for the same key

+
Params
+

[method]message.complete: func

Completes/acks the message

A message can exist under several statuses: diff --git a/imports.md b/imports.md index 384da07..40667d7 100644 --- a/imports.md +++ b/imports.md @@ -44,12 +44,10 @@ action. This error is mainly used when calling `update-guest-configuration`.

The interface doesn't highlight this difference in the type itself as that's uniquely a consumer issue.

record guest-configuration

Configuration includes a required list of channels the guest is subscribing to, and an -optional list of extensions key-value pairs (e.g., partitions/offsets to read from in -Kafka/EventHubs, QoS etc.).

+optional list of extensions key-value pairs

Record Fields

resource message

A message with a binary payload and additional information

@@ -85,6 +83,13 @@ Kafka/EventHubs, QoS etc.).

+

[method]message.set-topic: func

+

Set the topic/subject/channel this message should be sent on

+
Params
+

[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

@@ -96,6 +101,14 @@ sometimes described as the "format" type

+

[method]message.set-content-type: func

+

Set the content-type describing the format of the data in the message. This is +sometimes described as the "format" type

+
Params
+

[method]message.data: func

An opaque blob of data

Params
@@ -106,6 +119,13 @@ sometimes described as the "format" type

+

[method]message.set-data: func

+

Set the opaque blob of data for this message, discarding the old value

+
Params
+

[method]message.metadata: func

Optional metadata (also called headers or attributes in some systems) attached to the message

@@ -117,6 +137,14 @@ message

+

[method]message.add-metadata: func

+

Add a new key-value pair to the metadata, overwriting any existing value for the same key

+
Params
+

[method]message.complete: func

Completes/acks the message

A message can exist under several statuses: diff --git a/messaging.md b/messaging.md index 2702f43..031f682 100644 --- a/messaging.md +++ b/messaging.md @@ -49,12 +49,10 @@ action. This error is mainly used when calling `update-guest-configuration`.

The interface doesn't highlight this difference in the type itself as that's uniquely a consumer issue.

record guest-configuration

Configuration includes a required list of channels the guest is subscribing to, and an -optional list of extensions key-value pairs (e.g., partitions/offsets to read from in -Kafka/EventHubs, QoS etc.).

+optional list of extensions key-value pairs

Record Fields

resource message

A message with a binary payload and additional information

@@ -90,6 +88,13 @@ Kafka/EventHubs, QoS etc.).

+

[method]message.set-topic: func

+

Set the topic/subject/channel this message should be sent on

+
Params
+

[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

@@ -101,6 +106,14 @@ sometimes described as the "format" type

+

[method]message.set-content-type: func

+

Set the content-type describing the format of the data in the message. This is +sometimes described as the "format" type

+
Params
+

[method]message.data: func

An opaque blob of data

Params
@@ -111,6 +124,13 @@ sometimes described as the "format" type

+

[method]message.set-data: func

+

Set the opaque blob of data for this message, discarding the old value

+
Params
+

[method]message.metadata: func

Optional metadata (also called headers or attributes in some systems) attached to the message

@@ -122,6 +142,14 @@ message

+

[method]message.add-metadata: func

+

Add a new key-value pair to the metadata, overwriting any existing value for the same key

+
Params
+

[method]message.complete: func

Completes/acks the message

A message can exist under several statuses: diff --git a/wit/types.wit b/wit/types.wit index c408f53..fe64e47 100644 --- a/wit/types.wit +++ b/wit/types.wit @@ -26,11 +26,9 @@ interface types { type channel = string; /// Configuration includes a required list of channels the guest is subscribing to, and an - /// optional list of extensions key-value pairs (e.g., partitions/offsets to read from in - /// Kafka/EventHubs, QoS etc.). + /// optional list of extensions key-value pairs record guest-configuration { channels: list, - extensions: option>> } /// A message with a binary payload and additional information @@ -38,14 +36,23 @@ interface types { constructor(topic: channel, data: list, content-type: option, metadata: option>>); /// The topic/subject/channel this message was received or should be sent on topic: func() -> channel; + /// Set the topic/subject/channel this message should be sent on + set-topic: func(topic: channel); /// An optional content-type describing the format of the data in the message. This is /// sometimes described as the "format" type content-type: func() -> option; + /// Set the content-type describing the format of the data in the message. This is + /// sometimes described as the "format" type + set-content-type: func(content-type: string); /// An opaque blob of data data: func() -> list; + /// Set the opaque blob of data for this message, discarding the old value + set-data: func(data: list); /// Optional metadata (also called headers or attributes in some systems) attached to the /// message metadata: func() -> option>>; + /// Add a new key-value pair to the metadata, overwriting any existing value for the same key + add-metadata: func(key: string, value: string); /// Completes/acks the message ///