|
1 | 1 | ---
|
2 | 2 | title: ServiceControl Forwarding Log Queues
|
3 | 3 | summary: Details of the ServiceControl audit and error configuration and forwarding behavior
|
4 |
| -reviewed: 2025-06-27 |
| 4 | +reviewed: 2025-07-25 |
5 | 5 | ---
|
6 | 6 |
|
7 | 7 | ## Audit and error queues
|
8 | 8 |
|
9 |
| -ServiceControl consumes messages from the audit and error queues and stores these messages locally in its own embedded database. These input queues names are specified at install time. |
| 9 | +ServiceControl Error and Audit instances consume messages from endpoint-defined `audit` and `error` queues. These are specified during instance setup and ingested through the instance's configured input queues, such as `Particular.ServiceControl` and `Particular.ServiceControl.Audit`. Once received, messages are persisted to ServiceControl's embedded RavenDB database. These input queues names are specified at install time. |
10 | 10 |
|
11 |
| -ServiceControl can also forward these messages to two log queues: |
| 11 | +Optionally, ServiceControl can forward these messages to external log queues: |
12 | 12 |
|
13 |
| - * Error messages are optionally forwarded to the _error_ log queue. Default: `error.log`. |
14 |
| - * Audit messages are optionally forwarded to the _audit_ log queue. Default: `audit.log`. |
| 13 | +* Error messages are optionally forwarded to the _error_ log queue. Default: `error.log`. |
| 14 | +* Audit messages are optionally forwarded to the _audit_ log queue. Default: `audit.log`. |
15 | 15 |
|
16 |
| -This forwarding behavior can be enabled or disabled through ServiceControl Management. |
| 16 | +This forwarding behavior is controlled via ServiceControl Management and can be enabled or disabled as needed. |
17 | 17 |
|
18 | 18 | 
|
19 | 19 |
|
20 | 20 | ## Processing failures are not forwarded immediately
|
21 | 21 |
|
22 |
| -Failed imports are not forwarded to the error log queue immediately. These will be stored in ServiceControl as Failed Imports or in the error queue of the ServiceControl instance type. Messages are forwarded by ServiceControl only after it is successfully stored in its datebase. |
| 22 | +When forwarding is enabled, ServiceControl does not forward [failed imports](/servicecontrol/import-failed-messages.md) to log queues immediately. It first attempts to ingest the messages from the error or audit queues to persist them in its embedded RavenDB database. Only after the message is successfully stored, does ServiceControl forward a copy of the messages to the configured log queues (error.log and/or audit.log). If the message ingestion fails (e.g., due to message corruption, transport issues , invalid headers etc.) then the message is not forwarded. Instead it is stored internally in the database under the `FailedAuditImports` and `FailedErrorImports` collections. It may also be routed to the ServiceControl's internal error queue (Particular.ServiceControl.Error). |
23 | 23 |
|
24 |
| -If messages must be forwarded immediately, even if ServiceControl cannot process the messages, the solution is to invert the processing order. Failed messages should be sent to a `process_errors` queue. A custom process will read from the `process_errors` queue, then forward the messages to the `error` queue that ServiceControl will process. |
| 24 | +If immediate forwarding is required, regardless of whether ServiceControl can ingest the message or not, the solution is to invert the processing order. The endpoints are configured to send failed messages to a `process_errors` queue. A custom processor will read from this `process_errors` queue and can then forward the messages to the `error` queue that ServiceControl will process. |
25 | 25 |
|
26 | 26 | The same can be done for audit messages.
|
27 | 27 |
|
28 |
| -Forwarding by ServiceControl: |
| 28 | +Forwarding by ServiceControl(default): |
29 | 29 |
|
30 | 30 | "error" -> ServiceControl -> "error.log" -> Custom Processor
|
31 | 31 |
|
32 |
| -Forwarding by Custom Processor: |
| 32 | +Forwarding by Custom Processor(inverted model): |
33 | 33 |
|
34 | 34 | "error" -> Custom Processor -> "error.log" -> ServiceControl
|
35 | 35 |
|
36 |
| -This gives the custom processor control over message handling before ServiceControl does for audit and error processing. |
37 |
| - |
| 36 | +This inverted model gives external processors pre-ingestion control over message behavior, including filtering, tagging, and early forwarding. It can be similarly applied to audit messages. |
38 | 37 |
|
39 | 38 | ## Error and audit log queues
|
40 | 39 |
|
|
0 commit comments