Skip to content

Commit

Permalink
adr: add a naming convention for events in the system
Browse files Browse the repository at this point in the history
Signed-off-by: Login Victor <batazor@evrone.com>
  • Loading branch information
batazor committed Aug 24, 2022
1 parent 771e878 commit 57ede87
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/architecture/decisions/0002-implement-as-event-naming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 2. Implement as event naming

Date: 2022-08-24

## Status

Accepted

## Context

- Need set Event naming

## Decision

We will stick to the following format of naming system events: **shortlink.link.event.new**

Where:
- **shortlink** is the name of the all system
- **link** is the domain name of the system
- **event** event trait
- **new** is the name of the event

Example:

```go
// MQ events
const (
// MQ_EVENT_LINK_NEW - subscribe on request created link
MQ_EVENT_LINK_NEW = "shortlink.link.event.new"

// MQ_EVENT_LINK_CREATED - subscribe on created link
MQ_EVENT_LINK_CREATED = "shortlink.link.event.created"
)
```

## Consequences

We get a single naming convention for events in the system.

0 comments on commit 57ede87

Please sign in to comment.