Skip to main content

Channel

View as Markdown

This page lists the TypeScript SDK names for Channels. The doc comment of each API gives its parameters, defaults, and errors. Read them in the TypeScript SDK API reference.

API names​

TaskTypeScript APIDex behavior
Define a ChannelChannelChannels
Define a ChannelMapChannelMapChannelMap
Declare it in the Flowchannels of the PersistenceSchema returned from getPersistenceSchemaFlow definition
Publish a message from a Step or RPCpublishCommits
Wait for messagesforOne, forN, atLeast, atMost, and rangeWait conditions
Read the messages a wait consumedresultsChannel results
Load pending messages for a methodChannelMap.loadMessages, with the load fields of StepOptions or RPCOptionsSelective state loading
Read loaded pending messagespendingMessages and findPendingMessagePending messages
Delete a pending messagedeletePending messages
Read the number of pending messagessizeSelective state loading
Count ChannelMap instances and list their keysChannelMap.getMapSize and ChannelMap.getAllInstanceKeysChannelMap
Complete the Flow only when Channels are emptyforceCompleteIfChannelsEmptyForceCompleteIfChannelsEmpty

Example​

Example: examples/typescript/src/primitives/channel/channel-flow.ts