Skip to content

Commit a8bd44b

Browse files
AppSync Events
1 parent a8add74 commit a8bd44b

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

docs/core/event_handler/appsync_events.md

+15-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: AppSync Events
33
description: Core utility
4+
status: new
45
---
56

67
Event Handler for AWS AppSync real-time events.
@@ -40,13 +41,14 @@ stateDiagram-v2
4041
* Easily handle publish and subscribe events with dedicated handler methods
4142
* Automatic routing based on namespace and channel patterns
4243
* 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
4545
* Graceful error handling for individual events
4646

4747
## Terminology
4848

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.
5052

5153
## Getting started
5254

@@ -126,12 +128,6 @@ You can use wildcard patterns to create catch-all handlers for multiple channels
126128

127129
When an event matches with multiple handlers, the most specific pattern takes precedence.
128130

129-
=== "working_with_wildcard_resolvers.py"
130-
131-
```python hl_lines="5 6 13"
132-
--8<-- "examples/event_handler_appsync_events/src/working_with_wildcard_resolvers.py"
133-
```
134-
135131
???+ note "Supported wildcard patterns"
136132
Only the following patterns are supported:
137133

@@ -142,6 +138,14 @@ When an event matches with multiple handlers, the most specific pattern takes pr
142138

143139
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 `/*`.
144140

141+
=== "working_with_wildcard_resolvers.py"
142+
143+
```python hl_lines="5 6 13"
144+
--8<-- "examples/event_handler_appsync_events/src/working_with_wildcard_resolvers.py"
145+
```
146+
147+
If the event doesn't match any registered handler, the Event Handler will log a warning and skip processing the event.
148+
145149
### Aggregated processing
146150

147151
???+ note "Aggregate Processing"
@@ -163,11 +167,11 @@ You can enable this with the `aggregate` parameter:
163167

164168
### Handling errors
165169

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.
167171

168172
#### Handling errors with individual items
169173

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.
171175

172176
=== "working_with_error_handling.py"
173177

0 commit comments

Comments
 (0)