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/asciidoc/getting-started.adoc
+6-19Lines changed: 6 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,16 @@
1
+
[[GettingStarted]]
1
2
== Getting Started
2
3
4
+
This quick start tutorial sets up a single node RabbitMQ and runs the sample reactive sender and consumer using Reactive Commons.
5
+
6
+
3
7
[[Requirements]]
4
8
=== Requirements
5
9
6
10
You need Java JRE installed (Java 8 or later).
7
11
8
12
You also need to install RabbitMQ. Follow the
9
13
https://www.rabbitmq.com/download.html[instructions from the website].
10
-
Note you should use RabbitMQ 3.6.x or later.
11
-
12
-
=== Quick Start
13
-
14
-
This quick start tutorial sets up a single node RabbitMQ and runs the sample reactive
15
-
sender and consumer using Reactive Commons.
16
14
17
15
==== Start RabbitMQ
18
16
@@ -37,20 +35,17 @@ Also you need to include the name for your app in the application.properties:
37
35
--------
38
36
spring.application.name=MyAppName
39
37
--------
40
-
Or yaml
38
+
Or yaml format
41
39
[source, yaml]
42
40
--------
43
41
spring:
44
42
application:
45
43
name: myAppName
46
44
--------
47
45
48
-
The https://github.com/reactor/reactor-rabbitmq/blob/master/reactor-rabbitmq-samples/src/main/java/reactor/rabbitmq/samples/SpringBootSample.java[`SpringBootSample`]
49
-
code is on GitHub.
50
-
51
46
===== DomainEventBus
52
47
53
-
You must enable DomainEventBus with the @EnableDomainEventBus annotation. It give you a bean DomainEventBus, which let you, to emit and listen messages like DomainEvent type.
48
+
You must enable DomainEventBus with the @EnableDomainEventBus annotation. It give you a DomainEventBus bean for emitting and listenning messages.
54
49
55
50
===== DomainEvent Class
56
51
The DomainEvent class has the following structure:
@@ -63,15 +58,7 @@ public class DomainEvent<T> {
63
58
private final String name;
64
59
private final String eventId;
65
60
private final T data;
66
-
67
-
public DomainEvent(String name, String eventId, T data) {
Copy file name to clipboardExpand all lines: docs/asciidoc/overview.adoc
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,17 +28,19 @@ avoiding unnecessary intermediate buffering or blocking.
28
28
=== Reactive API for Event Mechanism
29
29
30
30
Reactive Commons is a reactive API for asyncronous message driven communication based on Reactor.
31
-
Reactive Commons API enables messages to be published over RabbitMQ or SNS/SQS and consumed from those products using functional APIs with non-blocking back-pressure and low overheads.
32
-
This enables applications using Reactor to use RabbitMQ or SNS/SQS as a message bus, integrating with other systems to provide an end-to-end reactive system.
31
+
Reactive Commons API enables messages to be published over a event bus like RabbitMQ or SNS/SQS and consumed using functional APIs with non-blocking back-pressure and low overheads.
32
+
It enables applications using Reactor to use RabbitMQ or SNS/SQS as a message bus, integrating it with other systems to provide an end-to-end reactive system.
33
33
34
-
When we talk about asyncronous message driven communication, we can use several sematic ways to use the term "message". So, we can talk about Eventsand Commands.
34
+
When we talk about asyncronous message driven communication, we can use several sematic ways to use the term "message". So, we can talk about Events, Commands and Queries.
35
35
36
36
==== Events - Pub/Sub
37
-
Events represent a fact inside the domain, it is the representation of a decision or a state change that a system want to notify to its subscriptors. Events represents facts in the past, so events are not intentions or requests of anything in present, for example: "UserRegistered", "NotificationSent".
37
+
Events represent a fact inside the domain, it is the representation of a decision or a state change that a system want to notify to its subscribers. Events represents facts that nobody can change, so events are not intentions or requests of anything, An example may be and UserRegistered or a NotificationSent.
38
38
39
-
Events are the most important topic in a Publish-Subscribe system, because this element let us to notify a many stakeholders in a specific event. An other benefit is system is decouple, because you can add more subscriber to the system without modify some component.
39
+
Events are the most important topic in a Publish-Subscribe system, because this element let's notify a many stakeholders in a specific event. An other benefit is the system is decouple, because you can add more subscriber to the system without modify some component.
40
40
41
41
==== Commands
42
-
Commands represent a intention for doing something, that intention must to be doing by the domain context with that responsibility. An example of a command may be: "registerUser", "sendNotification".
42
+
Commands represent a intention for doing something, that intention must to be done by the domain context with that responsibility. An example of a command may be: "registerUser" or "sendNotification".
43
43
44
-
==== Request / Reply
44
+
==== Request / Reply
45
+
46
+
Queries represent a intention for getting information about something, that query must to be processed by the domain context with that responsibility and that context must respond with the information requested throught request/reply pattern. An example of a query may be: "UserInfo".
0 commit comments