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/async_event_dispatcher/quick_tour.md
+7-3
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
---
2
+
layout: default
3
+
nav_exclude: true
4
+
---
1
5
<h2align="center">Supporting Enqueue</h2>
2
6
3
7
Enqueue is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:
@@ -9,9 +13,9 @@ Enqueue is an MIT-licensed open source project with its ongoing development made
9
13
10
14
# Async event dispatcher (Symfony)
11
15
12
-
The doc shows how you can setup async event dispatching in plain PHP.
16
+
The doc shows how you can setup async event dispatching in plain PHP.
13
17
If you are looking for the ways to use it in Symfony application [read this post instead](../bundle/async_events.md)
14
-
18
+
15
19
*[Installation](#installation)
16
20
*[Configuration](#configuration)
17
21
*[Dispatch event](#dispatch-event)
@@ -47,7 +51,7 @@ $context = (new FsConnectionFactory('file://'.__DIR__.'/queues'))->createContext
Copy file name to clipboardExpand all lines: docs/bundle/async_commands.md
+7-2
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
---
2
+
layout: default
3
+
parent: "Symfony bundle"
4
+
title: Async commands
5
+
---
1
6
<h2align="center">Supporting Enqueue</h2>
2
7
3
8
Enqueue is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:
@@ -63,9 +68,9 @@ $promise = $producer->sendCommand(Commands::RUN_COMMAND, new RunCommand('debug:c
Copy file name to clipboardExpand all lines: docs/bundle/async_events.md
+20-15
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
---
2
+
layout: default
3
+
parent: "Symfony bundle"
4
+
title: Async events
5
+
---
1
6
<h2align="center">Supporting Enqueue</h2>
2
7
3
8
Enqueue is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:
@@ -9,9 +14,9 @@ Enqueue is an MIT-licensed open source project with its ongoing development made
9
14
10
15
# Async events
11
16
12
-
The EnqueueBundle allows you to dispatch events asynchronously.
13
-
Behind the scene it replaces your listener with one that sends a message to MQ.
14
-
The message contains the event object.
17
+
The EnqueueBundle allows you to dispatch events asynchronously.
18
+
Behind the scene it replaces your listener with one that sends a message to MQ.
19
+
The message contains the event object.
15
20
The consumer, once it receives the message, restores the event and dispatches it to only async listeners.
16
21
17
22
Async listeners benefits:
@@ -57,14 +62,14 @@ or to `kernel.event_subscriber`:
That's basically it. The rest of the doc describes advanced features.
72
+
That's basically it. The rest of the doc describes advanced features.
68
73
69
74
## Advanced Usage.
70
75
@@ -87,8 +92,8 @@ services:
87
92
88
93
The bundle uses [php serializer](https://github.com/php-enqueue/enqueue-dev/blob/master/pkg/enqueue-bundle/Events/PhpSerializerEventTransformer.php) transformer by default to pass events through MQ.
89
94
You can write a transformer for each event type by implementing the `Enqueue\AsyncEventDispatcher\EventTransformer` interface.
90
-
Consider the next example. It shows how to send an event that contains Doctrine entity as a subject
91
-
95
+
Consider the next example. It shows how to send an event that contains Doctrine entity as a subject
96
+
92
97
```php
93
98
<?php
94
99
namespace AcmeBundle\Listener;
@@ -116,22 +121,22 @@ class FooEventTransformer implements EventTransformer
116
121
117
122
/**
118
123
* {@inheritdoc}
119
-
*
124
+
*
120
125
* @param GenericEvent $event
121
126
*/
122
127
public function toMessage($eventName, Event $event = null)
Copy file name to clipboardExpand all lines: docs/bundle/cli_commands.md
+7-2
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
---
2
+
layout: default
3
+
parent: "Symfony bundle"
4
+
title: CLI commands
5
+
---
1
6
<h2align="center">Supporting Enqueue</h2>
2
7
3
8
Enqueue is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:
@@ -9,7 +14,7 @@ Enqueue is an MIT-licensed open source project with its ongoing development made
9
14
10
15
# Cli commands
11
16
12
-
The EnqueueBundle provides several commands.
17
+
The EnqueueBundle provides several commands.
13
18
The most useful one `enqueue:consume` connects to the broker and process the messages.
14
19
Other commands could be useful during debugging (like `enqueue:topics`) or deployment (like `enqueue:setup-broker`).
Copy file name to clipboardExpand all lines: docs/bundle/config_reference.md
+5
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
---
2
+
layout: default
3
+
parent: "Symfony bundle"
4
+
title: Config reference
5
+
---
1
6
<h2align="center">Supporting Enqueue</h2>
2
7
3
8
Enqueue is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:
Copy file name to clipboardExpand all lines: docs/bundle/consumption_extension.md
+6-1
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
---
2
+
layout: default
3
+
parent: "Symfony bundle"
4
+
title: Consumption extension
5
+
---
1
6
<h2align="center">Supporting Enqueue</h2>
2
7
3
8
Enqueue is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:
@@ -23,7 +28,7 @@ use Enqueue\Consumption\Context\PostMessageReceived;
23
28
class CountProcessedMessagesExtension implements PostMessageReceivedExtensionInterface
24
29
{
25
30
private $processedMessages = 0;
26
-
31
+
27
32
public function onPostMessageReceived(PostMessageReceived $context): void
Copy file name to clipboardExpand all lines: docs/bundle/debugging.md
+16-11
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
---
2
+
layout: default
3
+
parent: "Symfony bundle"
4
+
title: Debugging
5
+
---
1
6
<h2align="center">Supporting Enqueue</h2>
2
7
3
8
Enqueue is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:
@@ -11,7 +16,7 @@ Enqueue is an MIT-licensed open source project with its ongoing development made
11
16
12
17
## Profiler
13
18
14
-
It may be useful to see what messages were sent during a http request.
19
+
It may be useful to see what messages were sent during a http request.
15
20
The bundle provides a collector for Symfony [profiler](http://symfony.com/doc/current/profiler.html).
16
21
The extension collects all sent messages
17
22
@@ -36,17 +41,17 @@ use Symfony\Component\HttpFoundation\Request;
Copy file name to clipboardExpand all lines: docs/bundle/functional_testing.md
+20-15
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
---
2
+
layout: default
3
+
parent: "Symfony bundle"
4
+
title: Functional testing
5
+
---
1
6
<h2align="center">Supporting Enqueue</h2>
2
7
3
8
Enqueue is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:
@@ -10,17 +15,17 @@ Enqueue is an MIT-licensed open source project with its ongoing development made
10
15
# Functional testing
11
16
12
17
In this chapter we give some advices on how to test message queue related logic.
While testing the application you don't usually need to send real message to real broker.
20
-
Or even have a dependency on a MQ broker.
21
-
Here's the purpose of the NULL transport.
22
-
It simple do nothing when you ask it to send a message.
23
-
Pretty useful in tests.
24
+
While testing the application you don't usually need to send real message to real broker.
25
+
Or even have a dependency on a MQ broker.
26
+
Here's the purpose of the NULL transport.
27
+
It simple do nothing when you ask it to send a message.
28
+
Pretty useful in tests.
24
29
Here's how you can configure it.
25
30
26
31
```yaml
@@ -35,7 +40,7 @@ enqueue:
35
40
## Traceable message producer
36
41
37
42
Imagine you have a service `my_service` with a method `someMethod()` that internally sends a message and you have to find out was the message sent or not.
38
-
There is a solution for that. You have to enable traceable message producer in test environment.
43
+
There is a solution for that. You have to enable traceable message producer in test environment.
39
44
40
45
```yaml
41
46
# app/config/config_test.yml
@@ -57,28 +62,28 @@ class FooTest extends WebTestCase
0 commit comments