Permalink
Browse files

Update docs

  • Loading branch information...
phatboyg committed May 21, 2018
1 parent a17134a commit e0441ae770a237a4ad2c81ec206098997d6adb49
Showing with 171,100 additions and 0 deletions.
  1. +19 −0 advanced/README.md
  2. +117 −0 advanced/audit/README.md
  3. +3 −0 advanced/audit/ef.md
  4. +1,734 −0 advanced/audit/index.html
  5. +47 −0 advanced/courier/README.md
  6. +1,700 −0 advanced/courier/activities.html
  7. +79 −0 advanced/courier/activities.md
  8. +1,668 −0 advanced/courier/builder.html
  9. +31 −0 advanced/courier/builder.md
  10. +1,659 −0 advanced/courier/events.html
  11. +20 −0 advanced/courier/events.md
  12. +1,649 −0 advanced/courier/execute.html
  13. +12 −0 advanced/courier/execute.md
  14. +1,678 −0 advanced/courier/index.html
  15. +1,701 −0 advanced/courier/subscriptions.html
  16. +77 −0 advanced/courier/subscriptions.md
  17. +1,714 −0 advanced/interoperability.html
  18. +100 −0 advanced/interoperability.md
  19. +22 −0 advanced/middleware/README.md
  20. BIN advanced/middleware/ReceivePipeline.png
  21. +1,677 −0 advanced/middleware/circuit-breaker.html
  22. +46 −0 advanced/middleware/circuit-breaker.md
  23. +1,723 −0 advanced/middleware/custom.html
  24. +95 −0 advanced/middleware/custom.md
  25. +1,660 −0 advanced/middleware/index.html
  26. +1,666 −0 advanced/middleware/latest.html
  27. +28 −0 advanced/middleware/latest.md
  28. +1,665 −0 advanced/middleware/rate-limiter.html
  29. +32 −0 advanced/middleware/rate-limiter.md
  30. +1,644 −0 advanced/middleware/receive.html
  31. +5 −0 advanced/middleware/receive.md
  32. +16 −0 advanced/sagas/README.md
  33. +1,872 −0 advanced/sagas/automatonymous.html
  34. +306 −0 advanced/sagas/automatonymous.md
  35. +1,652 −0 advanced/sagas/index.html
  36. +2,024 −0 advanced/sagas/persistence.html
  37. +490 −0 advanced/sagas/persistence.md
  38. +144 −0 advanced/sagas/quickstart.md
  39. +20 −0 advanced/topology/README.md
  40. +1,644 −0 advanced/topology/consume.html
  41. +5 −0 advanced/topology/consume.md
  42. +1,671 −0 advanced/topology/conventions.html
  43. +40 −0 advanced/topology/conventions.md
  44. +1,663 −0 advanced/topology/index.html
  45. +1,709 −0 advanced/topology/message.html
  46. +80 −0 advanced/topology/message.md
  47. +1,657 −0 advanced/topology/publish.html
  48. +15 −0 advanced/topology/publish.md
  49. +33 −0 advanced/topology/rabbitmq/README.md
  50. +1,663 −0 advanced/topology/rabbitmq/binding.html
  51. +30 −0 advanced/topology/rabbitmq/binding.md
  52. +1,664 −0 advanced/topology/rabbitmq/index.html
  53. +1,704 −0 advanced/topology/rabbitmq/routingkey.html
  54. +74 −0 advanced/topology/rabbitmq/routingkey.md
  55. +1,647 −0 advanced/topology/send.html
  56. +7 −0 advanced/topology/send.md
  57. +18 −0 advanced/topology/servicebus/README.md
  58. +1,653 −0 advanced/topology/servicebus/index.html
  59. +1,659 −0 advanced/topology/servicebus/partitionkey.html
  60. +22 −0 advanced/topology/servicebus/partitionkey.md
  61. +1,658 −0 advanced/topology/servicebus/sessionid.html
  62. +21 −0 advanced/topology/servicebus/sessionid.md
  63. +1,658 −0 advanced/topology/servicebus/topicsub.html
  64. +23 −0 advanced/topology/servicebus/topicsub.md
  65. +1,734 −0 advanced/transactions.html
  66. +109 −0 advanced/transactions.md
  67. +73 −0 advanced/turnout/README.md
  68. +1,702 −0 advanced/turnout/index.html
  69. +1,761 −0 advanced/versioning.html
  70. +145 −0 advanced/versioning.md
  71. +8 −0 architecture/README.md
  72. +1,690 −0 architecture/green-cache.html
  73. +83 −0 architecture/green-cache.md
  74. +1,649 −0 architecture/index.html
  75. +22 −0 build/gitbook.css
  76. +52 −0 contributing/README.md
  77. +1,684 −0 contributing/index.html
  78. BIN gitbook/fonts/fontawesome/FontAwesome.otf
  79. BIN gitbook/fonts/fontawesome/fontawesome-webfont.eot
  80. +685 −0 gitbook/fonts/fontawesome/fontawesome-webfont.svg
  81. BIN gitbook/fonts/fontawesome/fontawesome-webfont.ttf
  82. BIN gitbook/fonts/fontawesome/fontawesome-webfont.woff
  83. BIN gitbook/fonts/fontawesome/fontawesome-webfont.woff2
  84. +7 −0 gitbook/gitbook-plugin-anchorjs/anchor-style.js
  85. +30 −0 gitbook/gitbook-plugin-edit-link/plugin.js
  86. +29 −0 gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css
  87. +69 −0 gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js
  88. +240 −0 gitbook/gitbook-plugin-fontsettings/fontsettings.js
  89. +291 −0 gitbook/gitbook-plugin-fontsettings/website.css
  90. +14 −0 gitbook/gitbook-plugin-github/plugin.js
  91. +7 −0 gitbook/gitbook-plugin-lunr/lunr.min.js
  92. +59 −0 gitbook/gitbook-plugin-lunr/search-lunr.js
  93. +221 −0 gitbook/gitbook-plugin-prism/prism-coy.css
  94. +128 −0 gitbook/gitbook-plugin-prism/prism-dark.css
  95. +116 −0 gitbook/gitbook-plugin-prism/prism-funky.css
  96. +121 −0 gitbook/gitbook-plugin-prism/prism-okaidia.css
  97. +148 −0 gitbook/gitbook-plugin-prism/prism-solarizedlight.css
  98. +121 −0 gitbook/gitbook-plugin-prism/prism-tomorrow.css
  99. +198 −0 gitbook/gitbook-plugin-prism/prism-twilight.css
  100. +137 −0 gitbook/gitbook-plugin-prism/prism.css
  101. +7 −0 gitbook/gitbook-plugin-search/lunr.min.js
  102. +50 −0 gitbook/gitbook-plugin-search/search-engine.js
  103. +35 −0 gitbook/gitbook-plugin-search/search.css
  104. +213 −0 gitbook/gitbook-plugin-search/search.js
  105. +90 −0 gitbook/gitbook-plugin-sharing/buttons.js
  106. +4 −0 gitbook/gitbook.js
  107. BIN gitbook/images/apple-touch-icon-precomposed-152.png
  108. BIN gitbook/images/favicon.ico
  109. +9 −0 gitbook/style.css
  110. +4 −0 gitbook/theme.js
  111. +1,652 −0 index.html
  112. +11 −0 introduction/README.md
  113. +1,683 −0 introduction/getting-help.html
  114. +64 −0 introduction/getting-help.md
  115. +1,663 −0 introduction/how-to-install.html
  116. +48 −0 introduction/how-to-install.md
  117. +1,650 −0 introduction/how-to-report-bugs.html
  118. +12 −0 introduction/how-to-report-bugs.md
  119. +1,652 −0 introduction/index.html
  120. +1,710 −0 introduction/packages.html
  121. +66 −0 introduction/packages.md
  122. +1,670 −0 introduction/prerequisites.html
  123. +45 −0 introduction/prerequisites.md
  124. +8 −0 learn/README.md
  125. +1,643 −0 learn/courses.html
  126. +5 −0 learn/courses.md
  127. +1,649 −0 learn/index.html
  128. +1,657 −0 learn/loving-the-community.html
  129. +14 −0 learn/loving-the-community.md
  130. +14 −0 learn/samples/README.md
  131. +1,658 −0 learn/samples/courier.html
  132. +19 −0 learn/samples/courier.md
  133. +1,653 −0 learn/samples/index.html
  134. +1,645 −0 learn/samples/request-response.html
  135. +6 −0 learn/samples/request-response.md
  136. +1,645 −0 learn/samples/saga.html
  137. +9 −0 learn/samples/saga.md
  138. +1,648 −0 learn/videos.html
  139. +14 −0 learn/videos.md
  140. +1,709 −0 quickstart.html
  141. +1 −0 search_index.json
  142. +6 −0 troubleshooting/README.md
  143. +1,692 −0 troubleshooting/common-gotchas.html
  144. +65 −0 troubleshooting/common-gotchas.md
  145. +1,647 −0 troubleshooting/index.html
  146. +1,810 −0 troubleshooting/show-config.html
  147. +176 −0 troubleshooting/show-config.md
  148. +17 −0 understand/README.md
  149. +1,705 −0 understand/additions-to-transport.html
  150. +92 −0 understand/additions-to-transport.md
  151. +1,712 −0 understand/default-topology.html
  152. +96 −0 understand/default-topology.md
  153. BIN understand/images/rabbitmq-publish-topology.png
  154. BIN understand/images/rabbitmq-send-topology.png
  155. +1,658 −0 understand/index.html
  156. +1,719 −0 understand/key-ideas.html
  157. +97 −0 understand/key-ideas.md
  158. +1,654 −0 understand/message-contracts.html
  159. +13 −0 understand/message-contracts.md
  160. +1,707 −0 understand/perfcounters.html
  161. +78 −0 understand/perfcounters.md
  162. +1,731 −0 understand/publishing.html
  163. +114 −0 understand/publishing.md
  164. +1,734 −0 understand/under-the-hood.html
  165. +89 −0 understand/under-the-hood.md
  166. +33 −0 usage/README.md
  167. +1,691 −0 usage/azure-functions.html
  168. +59 −0 usage/azure-functions.md
  169. +1,985 −0 usage/configuration.html
  170. +382 −0 usage/configuration.md
  171. +1,665 −0 usage/connect-endpoint.html
  172. +35 −0 usage/connect-endpoint.md
  173. +29 −0 usage/containers/README.md
  174. +1,854 −0 usage/containers/autofac.html
  175. +241 −0 usage/containers/autofac.md
  176. +1,715 −0 usage/containers/castlewindsor.html
  177. +81 −0 usage/containers/castlewindsor.md
  178. +1,667 −0 usage/containers/index.html
  179. +1,739 −0 usage/containers/msdi.html
  180. +108 −0 usage/containers/msdi.md
  181. +1,693 −0 usage/containers/ninject.html
  182. +57 −0 usage/containers/ninject.md
  183. +1,725 −0 usage/containers/structuremap.html
  184. +91 −0 usage/containers/structuremap.md
  185. +1,685 −0 usage/containers/unity.html
  186. +47 −0 usage/containers/unity.md
  187. +1,708 −0 usage/correlation.html
  188. +84 −0 usage/correlation.md
  189. +1,735 −0 usage/exceptions.html
  190. +113 −0 usage/exceptions.md
  191. +1,682 −0 usage/index.html
  192. +1,719 −0 usage/lifecycle-observers.html
  193. +86 −0 usage/lifecycle-observers.md
  194. +1,695 −0 usage/logging.html
  195. +73 −0 usage/logging.md
  196. +1,830 −0 usage/message-consumers.html
  197. +229 −0 usage/message-consumers.md
  198. +1,698 −0 usage/message-contracts.html
  199. +74 −0 usage/message-contracts.md
  200. +1,801 −0 usage/observers.html
  201. +189 −0 usage/observers.md
  202. +1,740 −0 usage/producing-messages.html
  203. +120 −0 usage/producing-messages.md
  204. +1,780 −0 usage/request-response.html
  205. +173 −0 usage/request-response.md
  206. +1,728 −0 usage/retries.html
  207. +105 −0 usage/retries.md
  208. +27 −0 usage/scheduling/README.md
  209. +1,686 −0 usage/scheduling/azure-sb-scheduler.html
  210. +53 −0 usage/scheduling/azure-sb-scheduler.md
  211. +1,666 −0 usage/scheduling/in-memory.html
  212. +31 −0 usage/scheduling/in-memory.md
  213. +1,664 −0 usage/scheduling/index.html
  214. +1,682 −0 usage/scheduling/rabbitmq-delayed.html
  215. +56 −0 usage/scheduling/rabbitmq-delayed.md
  216. +1,734 −0 usage/scheduling/redeliver.html
  217. +119 −0 usage/scheduling/redeliver.md
  218. +1,744 −0 usage/scheduling/scheduling-api.html
  219. +130 −0 usage/scheduling/scheduling-api.md
  220. +15 −0 usage/testing/README.md
  221. +1,643 −0 usage/testing/bus-harness.html
  222. +3 −0 usage/testing/bus-harness.md
  223. +1,654 −0 usage/testing/index.html
  224. +1,643 −0 usage/testing/testing-consumers.html
  225. +3 −0 usage/testing/testing-consumers.md
  226. +1,643 −0 usage/testing/testing-sagas.html
  227. +3 −0 usage/testing/testing-sagas.md
  228. +1,709 −0 usage/transports.html
  229. +88 −0 usage/transports.md
  230. 0 usage/transports/azure-sb.md
  231. 0 usage/transports/in-memory.md
  232. +67 −0 usage/transports/rabbitmq.md
View
@@ -0,0 +1,19 @@
+# Advanced Topics
+
+* [Sagas](sagas/README.md)
+ * [Automatonymous](sagas/automatonymous.md)
+ * [Persistence](sagas/persistence.md)
+* [Courier](courier/README.md)
+ * [Activities](courier/activities.md)
+ * [Builder](courier/builder.md)
+ * [Execution](courier/execute.md)
+ * [Events](courier/events.md)
+ * [Subscriptions](courier/subscriptions.md)
+* [Middleware](middleware/README.md)
+ * [Receive Pipeline](middleware/receive.md)
+ * [Circuit breaker](middleware/circuit-breaker.md)
+ * [Rate limiter](middleware/rate-limiter.md)
+ * [Latest](middleware/latest.md)
+ * [Custom](middleware/custom.md)
+* [Topology](topology/README.md)
+* [Transactions](transactions.md)
View
@@ -0,0 +1,117 @@
+# Message audit
+
+Due to asynchronous nature of messaging, it is not always easy to find out the message flow.
+Step-into end-to-end debugging is almost impossible to use, especially if message processing
+is done in parallel and consumers perform atomic operations.
+
+To enable better diagnostic and troubleshooting, the audit log, which contains all messages
+that have been sent and consumed, would provide a great help.
+
+Also, certain systems require keeping the full log of operations, and if all operations are
+done using messages, storing these messages will satisfy such requirement.
+
+MassTransit supports message audit by using special observers.
+
+## Principles
+
+Two main parts need to be saved for each message to provide complete audit:
+* The message itself
+* Metadata
+
+Message metadata includes:
+* Message id
+* Message type
+* Context type (Send, Publish or Consume)
+* Conversation id
+* Correlation id
+* Initiator id
+* Request id (for request/response)
+* Source address
+* Destination address
+* Response address (for request/response)
+* Fault address
+
+The audit feature is generic and requires an implementation for the `IMessageAuditStore` interface.
+This interface is very simple and has one method only:
+```csharp
+Task StoreMessage<T>(<T> message, MessageAuditMetadata metadata);
+```
+
+Some audit store implementations are included out of the box and described below.
+
+There are three observers that connect to the message pipeline and record them.
+Two are for messages being sent - send and publish observers; one is for messages that
+are being consumed.
+
+Consume observer is invoked before a message is consumed, so the message is stored to the audit
+store even if a consumer fails. Send and publish observers are invoked after the message
+has actually been sent.
+
+## Installation
+
+There are two extensions methods for `IBusControl` that enable sent and consumed messages audit.
+Configuring both looks like this:
+
+```csharp
+var busControl = ConfigureBus(); // all usual configuration
+busControl.ConnectSendAuditObservers(auditStore);
+busControl.ConnectConsumeAuditObserver(auditStore);
+```
+
+There, the `auditStore` is the audit persistent store. Currently available stores include:
+* [Entity Framework](ef.md)
+
+Please remember that observers need to be configured before the bus starts.
+
+## Filters
+
+Sometimes there are messages in the system that are technical. These could be some monitoring and
+healthcheck messages, which are being sent often and could pollute the audit log. Another example
+could be the `Fault<T>` events.
+
+In order not to save these messages to the audit store, you can filter them out. You can configure
+the observers to use message filters like this:
+
+```csharp
+busControl.ConnectSendAuditObservers(auditStore,
+ c => c.Ignore<HealthCheck>());
+busControl.ConnectConsumeAuditObserver(auditStore,
+ c => c.Ignore(typeof(ServicePoll), typeof(RubbishEvent)));
+```
+
+## Metadata factory
+
+By default, the audit logging feature uses its own, quite complete, metadata collection mechanism.
+However, you can implement your own metadata factories to collect more data or different data.
+
+There are two types of metadata factories:
+* `DefaultConsumeMetadataFactory` that gets the `ConsumeObserver`
+* `DefaultSendMetadataFactory` that gets the `SendObserver` (which is used for both send and publish)
+
+Factories are simple classes that implement `IConsumeMetadataFactory` or `ISendMetadataFactory`
+interfaces and return a new `MessageAuditMetadata` object from a given context.
+For example, the default consume audit metadata factory implementation looks like this:
+
+```csharp
+return new MessageAuditMetadata
+{
+ ContextType = contextType,
+ ConversationId = context.ConversationId,
+ CorrelationId = context.CorrelationId,
+ InitiatorId = context.InitiatorId,
+ MessageId = context.MessageId,
+ RequestId = context.RequestId,
+ DestinationAddress = context.DestinationAddress?.AbsoluteUri,
+ SourceAddress = context.SourceAddress?.AbsoluteUri,
+ FaultAddress = context.FaultAddress?.AbsoluteUri,
+ ResponseAddress = context.ResponseAddress?.AbsoluteUri,
+ Headers = context.Headers?.GetAll()?.ToDictionary(k => k.Key, v => v.Value.ToString())
+};
+```
+
+To use your own factory, you can use the third parameter when configuring the observers:
+
+```csharp
+busControl.ConnectSendAuditObservers(auditStore, filter, new MySendContextMetadataFactory());
+busControl.ConnectConsumeAuditObserver(auditStore, filter, new MySendContextMetadataFactory());
+```
View
@@ -0,0 +1,3 @@
+# Entity Framework Audit store
+
+This store saves audit messages as rows in an audit table.
Oops, something went wrong.

0 comments on commit e0441ae

Please sign in to comment.