rpc.async_request

← rpc.async_request

Ashterix

docs: rewrite JsonRpcBundle docs, add SDK docs, move them under docs/api

en/docs/api/json-rpc-bundle/functionality/events/async_request.md new file +48 āˆ’0

1 + # rpc.async_request
2 +
3 + ::::::block class="floatinginfobox floatinginfobox--fit"
4 + :::::columns border zebra
5 + ::::row
6 + :::col width="40%"
7 + **Event name**
8 + :::
9 + :::col
10 + `rpc.async_request`
11 + :::
12 + ::::
13 + ::::row
14 + :::col width="40%"
15 + **Constant**
16 + :::
17 + :::col
18 + `RpcEvent::REQUEST_ASYNC`
19 + :::
20 + ::::
21 + ::::row
22 + :::col width="40%"
23 + **Class**
24 + :::
25 + :::col
26 + `RpcAsyncRequestEvent` (extends `RpcRequestEvent`)
27 + :::
28 + ::::
29 + ::::row
30 + :::col width="40%"
31 + **Properties**
32 + :::
33 + :::col
34 + `RpcRequest $rpcRequest`
35 + :::
36 + ::::
37 + :::::
38 + ::::::
39 +
40 + :::warning subtitle="The event is not dispatched"
41 + The event is declared, and `RpcEventFactory` has a `fireAsyncRequest()` method, but in the current version the bundle does not dispatch it. See [Open issues](/docs/api/json-rpc-bundle/developers/known_issues/open).
42 + :::
43 +
44 + By design, the event was meant to mark the receipt of an asynchronous request (from a Symfony Messenger queue). Currently, messages from the queue are passed straight to execution without `rpc.request` and `rpc.async_request`.
45 +
46 + ## What to use instead
47 +
48 + * For requests from the queue — [`rpc.pre_execute`](/docs/api/json-rpc-bundle/functionality/events/pre_execute): it is dispatched for every method execution regardless of the source.