RejectionLog

The one shape of a command's rejection in the log, under the logger CATEGORY: a readable message, and the fields as SLF4J key-values named as the spans' attributes name them (CONTEXT, AGGREGATE, COMMAND, ERROR_TYPE, REQUEST_ID, and WITH_EVENTS for a decision's). A decision's rejection is a business outcome, at INFO (rejected); an admission's refusal is the gateway's ordinary work, at DEBUG (refused).

A saga's @OnRejected handler that accepts a rejection (derives nothing) is logged under a logger of its own, ACCEPTED_CATEGORY, at INFO (accepted), in the saga's service: the target's line, in the target's service, does not say which handler took the rejection, and for a command to another context it is in another service's log.

Properties

Link copied to clipboard
Link copied to clipboard
const val AGGREGATE: String
Link copied to clipboard
const val CATEGORY: String
Link copied to clipboard
const val COMMAND: String
Link copied to clipboard
const val COMMAND_ID: String
Link copied to clipboard
const val CONTEXT: String
Link copied to clipboard
const val ERROR_TYPE: String
Link copied to clipboard
const val REQUEST_ID: String
Link copied to clipboard
const val SUBSCRIPTION: String
Link copied to clipboard
const val WITH_EVENTS: String

Functions

Link copied to clipboard
fun accepted(context: String, handler: String, ref: AggregateRef, command: String, commandId: String, code: String)

The saga's @OnRejected handler, of the saga's context, accepted the rejection with code of command commandId on ref, deriving nothing.

Link copied to clipboard
fun refused(ref: AggregateRef, command: String, code: String, requestId: String)

command on ref refused at admission with code.

Link copied to clipboard
fun rejected(ref: AggregateRef, command: String, code: String, requestId: String, withEvents: Boolean, message: String)

command on ref rejected by its decision with code and message; withEvents if its events committed.