From 193c4a0d4f4caee9b7e59f50bb24916b1897ac5b Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Fri, 19 Jan 2024 15:19:25 -0500 Subject: [PATCH 1/2] Update comment to reflect availability with WebSockets Signed-off-by: Peter Broadhurst --- docs/reference/types/subscription.md | 2 +- docs/reference/types/wsstart.md | 2 +- docs/swagger/swagger.yaml | 56 ++++++++++++--------- internal/coremsgs/en_struct_descriptions.go | 2 +- 4 files changed, 35 insertions(+), 27 deletions(-) diff --git a/docs/reference/types/subscription.md b/docs/reference/types/subscription.md index 6ee7b937f..584fb45c5 100644 --- a/docs/reference/types/subscription.md +++ b/docs/reference/types/subscription.md @@ -105,7 +105,7 @@ nav_order: 3 | `firstEvent` | Whether your application would like to receive events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' | `SubOptsFirstEvent` | | `readAhead` | The number of events to stream ahead to your application, while waiting for confirmation of consumption of those events. At least once delivery semantics are used in FireFly, so if your application crashes/reconnects this is the maximum number of events you would expect to be redelivered after it restarts | `uint16` | | `withData` | Whether message events delivered over the subscription, should be packaged with the full data of those messages in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. | `bool` | -| `batch` | Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event in the batch. Commonly used with Webhooks to allow events to be delivered and acknowledged in batches. | `bool` | +| `batch` | Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. | `bool` | | `batchTimeout` | When batching is enabled, the optional timeout to send events even when the batch hasn't filled. | `string` | | `fastack` | Webhooks only: When true the event will be acknowledged before the webhook is invoked, allowing parallel invocations | `bool` | | `url` | Webhooks only: HTTP url to invoke. Can be relative if a base URL is set in the webhook plugin config | `string` | diff --git a/docs/reference/types/wsstart.md b/docs/reference/types/wsstart.md index f8f3798f7..3b854027e 100644 --- a/docs/reference/types/wsstart.md +++ b/docs/reference/types/wsstart.md @@ -96,7 +96,7 @@ nav_order: 23 | `firstEvent` | Whether your application would like to receive events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest' | `SubOptsFirstEvent` | | `readAhead` | The number of events to stream ahead to your application, while waiting for confirmation of consumption of those events. At least once delivery semantics are used in FireFly, so if your application crashes/reconnects this is the maximum number of events you would expect to be redelivered after it restarts | `uint16` | | `withData` | Whether message events delivered over the subscription, should be packaged with the full data of those messages in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports. | `bool` | -| `batch` | Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event in the batch. Commonly used with Webhooks to allow events to be delivered and acknowledged in batches. | `bool` | +| `batch` | Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets. | `bool` | | `batchTimeout` | When batching is enabled, the optional timeout to send events even when the batch hasn't filled. | `string` | | `fastack` | Webhooks only: When true the event will be acknowledged before the webhook is invoked, allowing parallel invocations | `bool` | | `url` | Webhooks only: HTTP url to invoke. Can be relative if a base URL is set in the webhook plugin config | `string` | diff --git a/docs/swagger/swagger.yaml b/docs/swagger/swagger.yaml index ff978ec5b..9c72d8dcb 100644 --- a/docs/swagger/swagger.yaml +++ b/docs/swagger/swagger.yaml @@ -27717,8 +27717,9 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is - a single event in the batch. Commonly used with Webhooks - to allow events to be delivered and acknowledged in batches. + a single event in the batch, allowing client-side optimizations + when processing the events in a group. Available for both + Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout @@ -28006,8 +28007,8 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event - in the batch. Commonly used with Webhooks to allow events - to be delivered and acknowledged in batches. + in the batch, allowing client-side optimizations when processing + the events in a group. Available for both Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout @@ -28276,8 +28277,9 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a - single event in the batch. Commonly used with Webhooks to - allow events to be delivered and acknowledged in batches. + single event in the batch, allowing client-side optimizations + when processing the events in a group. Available for both + Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout @@ -28561,8 +28563,8 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event - in the batch. Commonly used with Webhooks to allow events - to be delivered and acknowledged in batches. + in the batch, allowing client-side optimizations when processing + the events in a group. Available for both Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout @@ -28831,8 +28833,9 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a - single event in the batch. Commonly used with Webhooks to - allow events to be delivered and acknowledged in batches. + single event in the batch, allowing client-side optimizations + when processing the events in a group. Available for both + Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout @@ -29178,8 +29181,9 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a - single event in the batch. Commonly used with Webhooks to - allow events to be delivered and acknowledged in batches. + single event in the batch, allowing client-side optimizations + when processing the events in a group. Available for both + Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout @@ -36660,8 +36664,9 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is - a single event in the batch. Commonly used with Webhooks - to allow events to be delivered and acknowledged in batches. + a single event in the batch, allowing client-side optimizations + when processing the events in a group. Available for both + Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout @@ -36942,8 +36947,8 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event - in the batch. Commonly used with Webhooks to allow events - to be delivered and acknowledged in batches. + in the batch, allowing client-side optimizations when processing + the events in a group. Available for both Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout @@ -37212,8 +37217,9 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a - single event in the batch. Commonly used with Webhooks to - allow events to be delivered and acknowledged in batches. + single event in the batch, allowing client-side optimizations + when processing the events in a group. Available for both + Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout @@ -37490,8 +37496,8 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event - in the batch. Commonly used with Webhooks to allow events - to be delivered and acknowledged in batches. + in the batch, allowing client-side optimizations when processing + the events in a group. Available for both Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout @@ -37760,8 +37766,9 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a - single event in the batch. Commonly used with Webhooks to - allow events to be delivered and acknowledged in batches. + single event in the batch, allowing client-side optimizations + when processing the events in a group. Available for both + Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout @@ -38093,8 +38100,9 @@ paths: description: Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a - single event in the batch. Commonly used with Webhooks to - allow events to be delivered and acknowledged in batches. + single event in the batch, allowing client-side optimizations + when processing the events in a group. Available for both + Webhooks and WebSockets. type: boolean batchTimeout: description: When batching is enabled, the optional timeout diff --git a/internal/coremsgs/en_struct_descriptions.go b/internal/coremsgs/en_struct_descriptions.go index 8ecb94618..f26b6bf28 100644 --- a/internal/coremsgs/en_struct_descriptions.go +++ b/internal/coremsgs/en_struct_descriptions.go @@ -540,7 +540,7 @@ var ( SubscriptionCoreOptionsFirstEvent = ffm("SubscriptionCoreOptions.firstEvent", "Whether your application would like to receive events from the 'oldest' event emitted by your FireFly node (from the beginning of time), or the 'newest' event (from now), or a specific event sequence. Default is 'newest'") SubscriptionCoreOptionsReadAhead = ffm("SubscriptionCoreOptions.readAhead", "The number of events to stream ahead to your application, while waiting for confirmation of consumption of those events. At least once delivery semantics are used in FireFly, so if your application crashes/reconnects this is the maximum number of events you would expect to be redelivered after it restarts") SubscriptionCoreOptionsWithData = ffm("SubscriptionCoreOptions.withData", "Whether message events delivered over the subscription, should be packaged with the full data of those messages in-line as part of the event JSON payload. Or if the application should make separate REST calls to download that data. May not be supported on some transports.") - SubscriptionCoreOptionsBatch = ffm("SubscriptionCoreOptions.batch", "Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event in the batch. Commonly used with Webhooks to allow events to be delivered and acknowledged in batches.") + SubscriptionCoreOptionsBatch = ffm("SubscriptionCoreOptions.batch", "Events are delivered in batches in an ordered array. The batch size is capped to the readAhead limit. The event payload is always an array even if there is a single event in the batch, allowing client-side optimizations when processing the events in a group. Available for both Webhooks and WebSockets.") SubscriptionCoreOptionsBatchTimeout = ffm("SubscriptionCoreOptions.batchTimeout", "When batching is enabled, the optional timeout to send events even when the batch hasn't filled.") // TokenApproval field descriptions From 0c9117dc66eeccb9286d36662a554454bba4f1b1 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Mon, 12 Feb 2024 16:18:19 -0500 Subject: [PATCH 2/2] Update copyright year Signed-off-by: Nicko Guyer --- internal/coremsgs/en_struct_descriptions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/coremsgs/en_struct_descriptions.go b/internal/coremsgs/en_struct_descriptions.go index f26b6bf28..5e065c574 100644 --- a/internal/coremsgs/en_struct_descriptions.go +++ b/internal/coremsgs/en_struct_descriptions.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 //