You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/event_handler/appsync_events.md
+15-11
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: AppSync Events
3
3
description: Core utility
4
+
status: new
4
5
---
5
6
6
7
Event Handler for AWS AppSync real-time events.
@@ -40,13 +41,14 @@ stateDiagram-v2
40
41
* Easily handle publish and subscribe events with dedicated handler methods
41
42
* Automatic routing based on namespace and channel patterns
42
43
* Support for wildcard patterns to create catch-all handlers
43
-
* Process events in parallel or sequentially
44
-
* Control over event aggregation for batch processing
44
+
* Process events in parallel corontrol aggregation for batch processing
45
45
* Graceful error handling for individual events
46
46
47
47
## Terminology
48
48
49
-
**[AWS AppSync Events](https://docs.aws.amazon.com/appsync/latest/eventapi/event-api-welcome.html){target="_blank"}**. A service that enables you to quickly build secure, scalable real-time WebSocket APIs without managing infrastructure or writing API code. It handles connection management, message broadcasting, authentication, and monitoring, reducing time to market and operational costs.
49
+
**[AWS AppSync Events](https://docs.aws.amazon.com/appsync/latest/eventapi/event-api-welcome.html){target="_blank"}**. A service that enables you to quickly build secure, scalable real-time WebSocket APIs without managing infrastructure or writing API code.
50
+
51
+
It handles connection management, message broadcasting, authentication, and monitoring, reducing time to market and operational costs.
50
52
51
53
## Getting started
52
54
@@ -126,12 +128,6 @@ You can use wildcard patterns to create catch-all handlers for multiple channels
126
128
127
129
When an event matches with multiple handlers, the most specific pattern takes precedence.
@@ -142,6 +138,14 @@ When an event matches with multiple handlers, the most specific pattern takes pr
142
138
143
139
More specific routes will always take precedence over less specific ones. For example, `/default/channel1` will take precedence over `/default/*`, which will take precedence over `/*`.
If the event doesn't match any registered handler, the Event Handler will log a warning and skip processing the event.
148
+
145
149
### Aggregated processing
146
150
147
151
???+ note "Aggregate Processing"
@@ -163,11 +167,11 @@ You can enable this with the `aggregate` parameter:
163
167
164
168
### Handling errors
165
169
166
-
You can filter or reject events by throwing exceptions in your resolvers or by formatting the payload according to the expected response structure. This instructs AppSync not to propagate that specific message, so subscribers will not receive the corresponding message.
170
+
You can filter or reject events by raising exceptions in your resolvers or by formatting the payload according to the expected response structure. This instructs AppSync not to propagate that specific message, so subscribers will not receive it.
167
171
168
172
#### Handling errors with individual items
169
173
170
-
When processing items individually with `aggregate=False`, you can raise an exception to fail a specific item. When an exception is raised, the Event Handler will catch it and include the exception name and message in the response.
174
+
When processing items individually with `aggregate=False`, you can raise an exception to fail a specific message. When this happens, the Event Handler will catch it and include the exception name and message in the response.
0 commit comments