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
{{ message }}
This repository was archived by the owner on Dec 7, 2018. It is now read-only.
Copy file name to clipboardExpand all lines: part-iii-infrastructure-components/command-dispatching.md
+26-10
Original file line number
Diff line number
Diff line change
@@ -158,25 +158,33 @@ There are different types of interceptors: Dispatch Interceptors and Handler Int
158
158
159
159
Message Dispatch Interceptors are invoked when a command is dispatched on a Command Bus. They have the ability to alter the Command Message, by adding Meta Data, for example, or block the command by throwing an Exception. These interceptors are always invoked on the thread that dispatches the Command.
160
160
161
-
Let's create a Message Dispatch Interceptor which log each command message being dispatched on a `CommandBus`.
161
+
Let's create a Message Dispatch Interceptor which logs each command message being dispatched on a `CommandBus`.
@@ -201,14 +209,13 @@ Unlike Dispatch Interceptors, Handler Interceptors are invoked in the context of
201
209
202
210
Handler Interceptors are also typically used to manage transactions around the handling of a command. To do so, register a `TransactionManagingInterceptor`, which in turn is configured with a `TransactionManager` to start and commit \(or roll back\) the actual transaction.
203
211
204
-
Let's create a Message Handler Interceptor which will allow handling of commands that contain `axonUser` as a value for `userId` field in meta-data. If the `userId` is not present in the meta-data exception will be thrown which will prevent the command from being handled. If the `userId`does not match `axonUser` value, we will not proceed through the chain.
212
+
Let's create a Message Handler Interceptor which will allow handling of commands that contain `axonUser` as a value for the `userId` field contained in the `MetaData`. If the `userId` is not present in the meta-data an exception will be thrown which will prevent the command from being handled. If the `userId`'s value does not match `axonUser`, we will not proceed through the chain.
0 commit comments