diff --git a/content/docs/dev-guide/authorization.mdx b/content/docs/dev-guide/authorization.mdx
index 9eec825..c9c8730 100644
--- a/content/docs/dev-guide/authorization.mdx
+++ b/content/docs/dev-guide/authorization.mdx
@@ -13,13 +13,6 @@ keywords:
image: /img/mg-preview.png
---
-
- No SpiceDB container exists in `docker-compose.yaml`, and the old per-entity relations/permissions
- schema and REST role management API (`///roles`) no longer apply.
- Authorization is now owned entirely by **Atom** — see [Overview](/dev-guide/entities) for its
- entity model.
-
-
## The model
Atom answers one question: *can subject S perform action A on object O?*
diff --git a/content/docs/dev-guide/dev-tools/authentication.mdx b/content/docs/dev-guide/dev-tools/authentication.mdx
index 79bc5a9..e29eca4 100644
--- a/content/docs/dev-guide/dev-tools/authentication.mdx
+++ b/content/docs/dev-guide/dev-tools/authentication.mdx
@@ -13,12 +13,11 @@ keywords:
image: /img/mg-preview.png
---
-
-This page describes the previous JWT/Google-OIDC authentication model issued directly by
-`magistrala.auth`. That service is gone — authentication now goes through **Atom**, and
-day-to-day API access uses Atom-issued bearer tokens or Personal Access Tokens (PATs). See
-[API](/dev-guide/api) for the current sign-in/token flow and [Personal Access Tokens](/user-guide/pats)
-for PATs. The content below is kept for historical reference only.
+
+User sign-in and day-to-day API access now go through **Atom**-issued bearer tokens or
+[Personal Access Tokens](/user-guide/pats) — see [API](/dev-guide/api) for the current
+sign-in/token flow. The [Mutual TLS](#mutual-tls-authentication-with-x509-certificates) section
+below still applies for device/client certificate authentication.
## User authentication
diff --git a/content/docs/dev-guide/dev-tools/authorization.mdx b/content/docs/dev-guide/dev-tools/authorization.mdx
index b7d86a3..35c045e 100644
--- a/content/docs/dev-guide/dev-tools/authorization.mdx
+++ b/content/docs/dev-guide/dev-tools/authorization.mdx
@@ -14,15 +14,15 @@ image: /img/mg-preview.png
---
-
-This page describes the previous SpiceDB-backed authorization model (`domains`/`clients`
-terminology, SpiceDB schema language). SpiceDB has been replaced — authorization now goes through
-**Atom**, and the public entities are **Workspaces**/**Devices**. See
-[Authorization](/dev-guide/authorization) for the current model. The content below is kept for
-historical reference only.
+
+Authorization is provided by **Atom**, over the public **Workspaces**/**Devices** entities — see
+[Authorization](/dev-guide/authorization) for the current permission model. The domain/client/channel
+walkthrough below illustrates the same role and hierarchy concepts using the platform's earlier
+terminology; the [Personal Access Tokens](#magistrala-personal-access-token-pat-authentication)
+section further down is current.
-Magistrala allows for fine-grained control over user permissions, taking into account hierarchical relationships between entities workspaces, groups, channels, and devices. The structure and functionality of an authorization system previously implemented using [SpiceDB](https://github.com/authzed/spicedb) and its associated [schema language](https://authzed.com/docs/reference/schema-lang) — now superseded by Atom.
+Magistrala allows for fine-grained control over user permissions, taking into account hierarchical relationships between entities workspaces, groups, channels, and devices.
## Domains
diff --git a/content/docs/dev-guide/dev-tools/events.mdx b/content/docs/dev-guide/dev-tools/events.mdx
index bf45a8b..96ebf45 100644
--- a/content/docs/dev-guide/dev-tools/events.mdx
+++ b/content/docs/dev-guide/dev-tools/events.mdx
@@ -1,2364 +1,14 @@
---
title: Events
-description: Publish, process and consume service events for seamless integrations.
+description: Redis Streams event publishing has been retired — see Atom's audit log for the current way to track entity and access activity.
keywords:
- Events
- - Redis Streams
- - Event sourcing
- - Users
- - Clients
- - Bootstrap
- - MQTT
+ - Audit Log
+ - Atom
- Magistrala
image: /img/mg-preview.png
---
-
-This page describes the pre-Atom architecture, where `users`, `clients`, and `bootstrap` were
-standalone services publishing events to Redis Streams. Those services have since been
-consolidated into **Atom** (`bootstrap` is now `atom-bootstrap`) — see
-[Entities](/dev-guide/entities) and [Architecture](/dev-guide/architecture) for the current model.
-The content below is kept for historical reference only.
-
+No current Magistrala service publishes events to Redis Streams. The `users`, `clients`, and `bootstrap` services that once did are now consolidated into **Atom** (`bootstrap` is now `atom-bootstrap`) — see [Entities](/dev-guide/entities) and [Architecture](/dev-guide/architecture) for the current service model. The standalone `mqtt` adapter that also published to Redis Streams no longer exists either; MQTT protocol handling is absorbed into FluxMQ natively. The Go package this mechanism used to be implemented in, `pkg/messaging/events`, has no importers anywhere in the current codebase.
-In order to be easily integrable system, Magistrala is using [Redis Streams][redis-streams] as an event log for event sourcing. Services that previously published events to Redis Streams included `users`, `clients`, `bootstrap`, and the `mqtt` adapter.
-
-## Users Service
-
-For every operation `users` service will generate new event and publish it to Redis Stream called `magistrala.users`. Every event has its own event ID that is automatically generated and `operation` field that can have one of the following values:
-
-- `user.create` for user creation
-- `user.update` for user update
-- `user.remove` for user change of state
-- `user.view` for user view
-- `user.view_profile` for user profile view
-- `user.list` for listing users
-- `user.list_by_group` for listing users by group
-- `user.identify` for user identification
-- `user.generate_reset_token` for generating reset token
-- `user.issue_token` for issuing token
-- `user.refresh_token` for refreshing token
-- `user.reset_secret` for resetting secret
-- `user.send_password_reset` for sending password reset
-- `group.create` for group creation
-- `group.update` for group update
-- `group.remove` for group change of state
-- `group.view` for group view
-- `group.list` for listing groups
-- `group.list_by_user` for listing groups by user
-- `policy.authorize` for policy authorization
-- `policy.add` for policy creation
-- `policy.update` for policy update
-- `policy.remove` for policy deletion
-- `policy.list` for listing policies
-
-By fetching and processing these events you can reconstruct `users` service state. If you store some of your custom data in `metadata` field, this is the perfect way to fetch it and process it. If you want to integrate through [docker-compose.yml][mg-docker-compose] you can use `magistrala-es-redis` service. Just connect to it and consume events from Redis Stream named `magistrala.users`.
-
-### User create event
-
-Whenever user is created, `users` service will generate new `create` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693307171926-0"
- 2) 1) "occurred_at"
- 2) "1693307171925834295"
- 3) "operation"
- 4) "user.create"
- 5) "id"
- 6) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 7) "status"
- 8) "enabled"
- 9) "created_at"
- 10) "2023-08-29T11:06:11.914074Z"
- 11) "name"
- 12) "-dry-sun"
- 13) "metadata"
- 14) "{}"
- 15) "identity"
- 16) "-small-flower@email.com"
- ```
-
- As you can see from this example, every odd field represents field name while every even field represents field value. This is standard event format for Redis Streams. If you want to extract `metadata` field from this event, you'll have to read it as string first and then you can deserialize it to some structured format.
-
-2. In Nats JetStream
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T15:41:04+03:00
-
- {"created_at":"2023-10-05T12:41:04.743529Z","id":"0a5f2e21-1a8b-460e-bfa9-732e570df095","identity":"wizardly_hopper@email.com","metadata":"e30=","name":"wizardly_hopper","occurred_at":1696509664755440542,"operation":"user.create","status":"enabled"}
- ```
-
-3. In RabbitMQ Streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.329385Z",
- "id": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "identity": "-Comley-Hipp@email.com",
- "metadata": "e30=",
- "name": "-Skurka-Brule",
- "occurred_at": 1697532232341083347,
- "operation": "user.create",
- "status": "enabled"
- }
- ```
-
-### User view event
-
-Whenever user is viewed, `users` service will generate new `view` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693307172248-0"
- 2) 1) "name"
- 2) "-holy-pond"
- 3) "owner"
- 4) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 5) "created_at"
- 6) "2023-08-29T11:06:12.032254Z"
- 7) "status"
- 8) "enabled"
- 9) "operation"
- 10) "user.view"
- 11) "id"
- 12) "56d2a797-dcb9-4fab-baf9-7c75e707b2c0"
- 13) "identity"
- 14) "-snowy-wave@email.com"
- 15) "metadata"
- 16) "{}"
- 17) "occurred_at"
- 18) "1693307172247989798"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T18:38:40+03:00
-
- {"created_at":"2023-10-05T15:38:40.219889Z","id":"d4baecb8-adfa-4c7c-8257-deea5d7f9dba","identity":"-Hilling-Karole@email.com","metadata":"e30=","name":"-Doud-Varley","occurred_at":1696520320355145103,"operation":"user.view","owner":"3264e965-3fe5-4d4e-a857-48de43551d2e","status":"enabled"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.441962Z",
- "id": "00397996-f7e0-4035-9271-3e48ee66d525",
- "identity": "-Yanish-Lanctot@email.com",
- "metadata": "e30=",
- "name": "-Busbey-Vadala",
- "occurred_at": 1697532237472321186,
- "operation": "user.view",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled"
- }
- ```
-
-### User view profile event
-
-Whenever user profile is viewed, `users` service will generate new `view_profile` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693308867001-0"
- 2) 1) "id"
- 2) "64fd20bf-e8fb-46bf-9b64-2a6572eda21b"
- 3) "name"
- 4) "admin"
- 5) "identity"
- 6) "admin@example.com"
- 7) "metadata"
- 8) "{\"role\":\"admin\"}"
- 9) "created_at"
- 10) "2023-08-29T10:55:23.048948Z"
- 11) "status"
- 12) "enabled"
- 13) "occurred_at"
- 14) "1693308867001792403"
- 15) "operation"
- 16) "user.view_profile"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T19:41:01+03:00
-
- {"created_at":"2023-10-05T11:59:02.029606Z","id":"97466511-6317-4c98-8d58-7bd78bcaf587","identity":"admin@example.com","metadata":"eyJyb2xlIjoiYWRtaW4ifQ==","name":"admin","occurred_at":1696524061363472648,"operation":"user.view_profile","status":"enabled"}
- ```
-
-### User list event
-
-Whenever user list is fetched, `users` service will generate new `list` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693307172254-0"
- 2) 1) "status"
- 2) "enabled"
- 3) "occurred_at"
- 4) "1693307172254687479"
- 5) "operation"
- 6) "user.list"
- 7) "total"
- 8) "0"
- 9) "offset"
- 10) "0"
- 11) "limit"
- 12) "10"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T18:38:40+03:00
-
- {"limit":10,"occurred_at":1696520320382884278,"offset":0,"operation":"user.list","status":"enabled","total":0}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "limit": 10,
- "occurred_at": 1697532237475179227,
- "offset": 0,
- "operation": "user.list",
- "status": "enabled",
- "total": 0
- }
- ```
-
-### User list by group event
-
-Whenever user list by group is fetched, `users` service will generate new `list_by_group` event. This event will have the following format:
-
-```bash
-1) "1693308952544-0"
-2) 1) "operation"
- 2) "user.list_by_group"
- 3) "total"
- 4) "0"
- 5) "offset"
- 6) "0"
- 7) "limit"
- 8) "10"
- 9) "group_id"
- 10) "bc7fb023-70d5-41aa-bf73-3eab1cf001c9"
- 11) "status"
- 12) "enabled"
- 13) "occurred_at"
- 14) "1693308952544612677"
-```
-
-### User identify event
-
-Whenever user is identified, `users` service will generate new `identify` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693307172168-0"
- 2) 1) "operation"
- 2) "user.identify"
- 3) "user_id"
- 4) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 5) "occurred_at"
- 6) "1693307172167980303"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T15:11:22+03:00
-
- {"occurred_at":1696507882455392181,"operation":"user.identify","user_id":"733005f5-7a69-4da3-adac-1ac3bd6fdedf"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "occurred_at": 1697532232453091076,
- "operation": "user.identify",
- "user_id": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### User generate reset token event
-
-Whenever user reset token is generated, `users` service will generate new `generate_reset_token` event. This event will have the following format:
-
-```bash
-1) "1693310458376-0"
-2) 1) "operation"
- 2) "user.generate_reset_token"
- 3) "email"
- 4) "rodneydav@gmail.com"
- 5) "host"
- 6) "http://localhost"
- 7) "occurred_at"
- 8) "1693310458376066097"
-```
-
-### User issue token event
-
-Whenever user token is issued, `users` service will generate new `issue_token` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693307171987-0"
- 2) 1) "operation"
- 2) "user.issue_token"
- 3) "identity"
- 4) "-small-flower@email.com"
- 5) "occurred_at"
- 6) "1693307171987023095"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T14:59:02+03:00
-
- {"identity":"admin@example.com","occurred_at":1696507142218064965,"operation":"user.issue_token"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "identity": "-Comley-Hipp@email.com",
- "occurred_at": 1697532232391996417,
- "operation": "user.issue_token"
- }
- ```
-
-### User refresh token event
-
-Whenever user token is refreshed, `users` service will generate new `refresh_token` event. This event will have the following format:
-
-```bash
-1) "1693309886622-0"
-2) 1) "operation"
- 2) "user.refresh_token"
- 3) "occurred_at"
- 4) "1693309886622414715"
-```
-
-### User reset secret event
-
-Whenever user secret is reset, `users` service will generate new `reset_secret` event. This event will have the following format:
-
-```bash
-1) "1693311075789-0"
-2) 1) "operation"
- 2) "user.update_secret"
- 3) "updated_by"
- 4) "34591d29-13eb-49f8-995b-e474911eeb8a"
- 5) "name"
- 6) "rodney"
- 7) "created_at"
- 8) "2023-08-29T11:59:51.456429Z"
- 9) "status"
- 10) "enabled"
- 11) "occurred_at"
- 12) "1693311075789446621"
- 13) "updated_at"
- 14) "2023-08-29T12:11:15.785039Z"
- 15) "id"
- 16) "34591d29-13eb-49f8-995b-e474911eeb8a"
- 17) "identity"
- 18) "rodneydav@gmail.com"
- 19) "metadata"
- 20) "{}"
-```
-
-### User update event
-
-Whenever user instance is updated, `users` service will generate new `update` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693307172308-0"
- 2) 1) "operation"
- 2) "user.update"
- 3) "updated_by"
- 4) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 5) "id"
- 6) "56d2a797-dcb9-4fab-baf9-7c75e707b2c0"
- 7) "metadata"
- 8) "{\"Update\":\"rough-leaf\"}"
- 9) "updated_at"
- 10) "2023-08-29T11:06:12.294444Z"
- 11) "name"
- 12) "fragrant-voice"
- 13) "identity"
- 14) "-snowy-wave@email.com"
- 15) "created_at"
- 16) "2023-08-29T11:06:12.032254Z"
- 17) "status"
- 18) "enabled"
- 19) "occurred_at"
- 20) "1693307172308305030"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T18:38:40+03:00
-
- {"created_at":"2023-10-05T15:38:40.219889Z","id":"d4baecb8-adfa-4c7c-8257-deea5d7f9dba","identity":"-Hilling-Karole@email.com","metadata":"eyJVcGRhdGUiOiJBbGVncmlhLVdvbGwifQ==","name":"Rhude-Parrillo","occurred_at":1696520320510448519,"operation":"user.update","status":"enabled","updated_at":"2023-10-05T15:38:40.500637Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.441962Z",
- "id": "00397996-f7e0-4035-9271-3e48ee66d525",
- "identity": "-Yanish-Lanctot@email.com",
- "metadata": "eyJVcGRhdGUiOiJWZW5hYmxlcy1IeW1hbiJ9",
- "name": "Eicholtz-Stallabrass",
- "occurred_at": 1697532242530064639,
- "operation": "user.update",
- "status": "enabled",
- "updated_at": "2023-10-17T08:44:02.519652Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### User update identity event
-
-Whenever user identity is updated, `users` service will generate new `update_identity` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693307172321-0"
- 2) 1) "metadata"
- 2) "{\"Update\":\"rough-leaf\"}"
- 3) "created_at"
- 4) "2023-08-29T11:06:12.032254Z"
- 5) "status"
- 6) "enabled"
- 7) "updated_at"
- 8) "2023-08-29T11:06:12.310276Z"
- 9) "updated_by"
- 10) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 11) "id"
- 12) "56d2a797-dcb9-4fab-baf9-7c75e707b2c0"
- 13) "name"
- 14) "fragrant-voice"
- 15) "operation"
- 16) "user.update_identity"
- 17) "identity"
- 18) "wandering-brook"
- 19) "occurred_at"
- 20) "1693307172320906479"
- ```
-
-2. In Nats JetStream
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T18:38:40+03:00
-
- {"created_at":"2023-10-05T15:38:40.219889Z","id":"d4baecb8-adfa-4c7c-8257-deea5d7f9dba","identity":"Andes-Bahgat","metadata":"eyJVcGRhdGUiOiJBbGVncmlhLVdvbGwifQ==","name":"Rhude-Parrillo","occurred_at":1696520320527730565,"operation":"user.update_identity","status":"enabled","updated_at":"2023-10-05T15:38:40.518477Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.441962Z",
- "id": "00397996-f7e0-4035-9271-3e48ee66d525",
- "identity": "Cris-Unkles",
- "metadata": "eyJVcGRhdGUiOiJWZW5hYmxlcy1IeW1hbiJ9",
- "name": "Eicholtz-Stallabrass",
- "occurred_at": 1697532242534643742,
- "operation": "user.update_identity",
- "status": "enabled",
- "updated_at": "2023-10-17T08:44:02.532198Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### User update tags event
-
-Whenever user tags are updated, `users` service will generate new `update_tags` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693307172332-0"
- 2) 1) "name"
- 2) "fragrant-voice"
- 3) "identity"
- 4) "wandering-brook"
- 5) "metadata"
- 6) "{\"Update\":\"rough-leaf\"}"
- 7) "status"
- 8) "enabled"
- 9) "updated_at"
- 10) "2023-08-29T11:06:12.323039Z"
- 11) "updated_by"
- 12) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 13) "id"
- 14) "56d2a797-dcb9-4fab-baf9-7c75e707b2c0"
- 15) "occurred_at"
- 16) "1693307172332766275"
- 17) "operation"
- 18) "user.update_tags"
- 19) "tags"
- 20) "[patient-thunder]"
- 21) "created_at"
- 22) "2023-08-29T11:06:12.032254Z"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T18:38:40+03:00
-
- {"created_at":"2023-10-05T15:38:40.219889Z","id":"d4baecb8-adfa-4c7c-8257-deea5d7f9dba","identity":"Andes-Bahgat","metadata":"eyJVcGRhdGUiOiJBbGVncmlhLVdvbGwifQ==","name":"Rhude-Parrillo","occurred_at":1696520320537588492,"operation":"user.update_tags","status":"enabled","tags":"[Tischler-Persechino]","updated_at":"2023-10-05T15:38:40.533159Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.441962Z",
- "id": "00397996-f7e0-4035-9271-3e48ee66d525",
- "identity": "Cris-Unkles",
- "metadata": "eyJVcGRhdGUiOiJWZW5hYmxlcy1IeW1hbiJ9",
- "name": "Eicholtz-Stallabrass",
- "occurred_at": 1697532242539607155,
- "operation": "user.update_tags",
- "status": "enabled",
- "tags": "[Jagdish-Daneshzadeh]",
- "updated_at": "2023-10-17T08:44:02.536891Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### User remove event
-
-Whenever user instance changes state in the system, `users` service will generate and publish new `remove` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693307172345-0"
- 2) 1) "operation"
- 2) "user.remove"
- 3) "id"
- 4) "56d2a797-dcb9-4fab-baf9-7c75e707b2c0"
- 5) "status"
- 6) "disabled"
- 7) "updated_at"
- 8) "2023-08-29T11:06:12.323039Z"
- 9) "updated_by"
- 10) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 11) "occurred_at"
- 12) "1693307172345419824"
-
- 1) "1693307172359-0"
- 2) 1) "id"
- 2) "56d2a797-dcb9-4fab-baf9-7c75e707b2c0"
- 3) "status"
- 4) "enabled"
- 5) "updated_at"
- 6) "2023-08-29T11:06:12.323039Z"
- 7) "updated_by"
- 8) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 9) "occurred_at"
- 10) "1693307172359445655"
- 11) "operation"
- 12) "user.remove"
- ```
-
-2. In Nats JetStream
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T17:59:29+03:00
-
- {"id":"0a5f2e21-1a8b-460e-bfa9-732e570df095","occurred_at":1696517969187562377,"operation":"user.remove","status":"disabled","updated_at":"0001-01-01T00:00:00Z","updated_by":""}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "id": "00397996-f7e0-4035-9271-3e48ee66d525",
- "occurred_at": 1697532242544658933,
- "operation": "user.remove",
- "status": "disabled",
- "updated_at": "2023-10-17T08:44:02.536891Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### Group create event
-
-Whenever group is created, `users` service will generate new `create` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693307172153-0"
- 2) 1) "name"
- 2) "-fragrant-resonance"
- 3) "metadata"
- 4) "{}"
- 5) "occurred_at"
- 6) "1693307172152850138"
- 7) "operation"
- 8) "group.create"
- 9) "id"
- 10) "bc7fb023-70d5-41aa-bf73-3eab1cf001c9"
- 11) "status"
- 12) "enabled"
- 13) "created_at"
- 14) "2023-08-29T11:06:12.129484Z"
- 15) "owner"
- 16) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- ```
-
- As you can see from this example, every odd field represents field name while every even field represents field value. This is standard event format for Redis Streams. If you want to extract `metadata` field from this event, you'll have to read it as string first and then you can deserialize it to some structured format.
-
-2. In Nats JetStream
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T16:12:00+03:00
-
- {"created_at":"2023-10-05T13:12:00.88713Z","id":"f565885c-826d-4c4c-9277-a3c8537aadff","metadata":"e30=","name":"cyclopes","occurred_at":1696511520897093737,"operation":"group.create","owner":"97466511-6317-4c98-8d58-7bd78bcaf587","status":"enabled"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.447093Z",
- "id": "d9c550f9-e644-453b-af5b-1ab7e9a99d9d",
- "metadata": "e30=",
- "name": "-Zarella-Knobeloch",
- "occurred_at": 1697532232450859819,
- "operation": "group.create",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled"
- }
- ```
-
-### Group update event
-
-Whenever group instance is updated, `users` service will generate new `update` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693307172445-0"
- 2) 1) "operation"
- 2) "group.update"
- 3) "owner"
- 4) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 5) "name"
- 6) "young-paper"
- 7) "occurred_at"
- 8) "1693307172445370750"
- 9) "updated_at"
- 10) "2023-08-29T11:06:12.429555Z"
- 11) "updated_by"
- 12) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 13) "id"
- 14) "bc7fb023-70d5-41aa-bf73-3eab1cf001c9"
- 15) "metadata"
- 16) "{\"Update\":\"spring-wood\"}"
- 17) "created_at"
- 18) "2023-08-29T11:06:12.129484Z"
- 19) "status"
- 20) "enabled"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T18:38:40+03:00
-
- {"created_at":"2023-10-05T15:38:40.22859Z","id":"cabccc8d-937b-4d92-832b-48d7a466e19e","metadata":"eyJVcGRhdGUiOiJSZWdvLVJlZHdheSJ9","name":"Reiger-Cheal","occurred_at":1696520320573615888,"operation":"group.update","owner":"3264e965-3fe5-4d4e-a857-48de43551d2e","status":"enabled","updated_at":"2023-10-05T15:38:40.56848Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.447093Z",
- "id": "d9c550f9-e644-453b-af5b-1ab7e9a99d9d",
- "metadata": "eyJVcGRhdGUiOiJCaW5ueS1TYXZhZGtvdWhpIn0=",
- "name": "Knick-Doskas",
- "occurred_at": 1697532242554817001,
- "operation": "group.update",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled",
- "updated_at": "2023-10-17T08:44:02.552421Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### Group view event
-
-Whenever group is viewed, `users` service will generate new `view` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693307172257-0"
- 2) 1) "occurred_at"
- 2) "1693307172257041358"
- 3) "operation"
- 4) "group.view"
- 5) "id"
- 6) "bc7fb023-70d5-41aa-bf73-3eab1cf001c9"
- 7) "owner"
- 8) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 9) "name"
- 10) "-fragrant-resonance"
- 11) "metadata"
- 12) "{}"
- 13) "created_at"
- 14) "2023-08-29T11:06:12.129484Z"
- 15) "status"
- 16) "enabled"
- ```
-
-2. In Nats JetStream
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T18:38:40+03:00
-
- {"created_at":"2023-10-05T15:38:40.22859Z","id":"cabccc8d-937b-4d92-832b-48d7a466e19e","metadata":"e30=","name":"-Conneely-Chiang","occurred_at":1696520320392002702,"operation":"group.view","owner":"3264e965-3fe5-4d4e-a857-48de43551d2e","status":"enabled"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.447093Z",
- "id": "d9c550f9-e644-453b-af5b-1ab7e9a99d9d",
- "metadata": "e30=",
- "name": "-Zarella-Knobeloch",
- "occurred_at": 1697532237477518526,
- "operation": "group.view",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled"
- }
- ```
-
-### Group list event
-
-Whenever group list is fetched, `users` service will generate new `list` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693307172264-0"
- 2) 1) "occurred_at"
- 2) "1693307172264183217"
- 3) "operation"
- 4) "group.list"
- 5) "total"
- 6) "0"
- 7) "offset"
- 8) "0"
- 9) "limit"
- 10) "10"
- 11) "status"
- 12) "enabled"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T19:41:01+03:00
-
- {"limit":100,"occurred_at":1696524061330756963,"offset":0,"operation":"group.list","status":"all","total":0}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "limit": 10,
- "occurred_at": 1697532237481188226,
- "offset": 0,
- "operation": "group.list",
- "status": "enabled",
- "total": 0
- }
- ```
-
-### Group list by user event
-
-Whenever group list by user is fetched, `users` service will generate new `list_by_user` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693308937283-0"
- 2) 1) "limit"
- 2) "10"
- 3) "channel_id"
- 4) "bb1a7b38-cd79-410d-aca7-e744decd7b8e"
- 5) "status"
- 6) "enabled"
- 7) "occurred_at"
- 8) "1693308937282933017"
- 9) "operation"
- 10) "group.list_by_user"
- 11) "total"
- 12) "0"
- 13) "offset"
- 14) "0"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T19:41:01+03:00
-
- {"limit":100,"occurred_at":1696524061330756963,"offset":0,"operation":"group.list","status":"all","total":0}
- ```
-
-### Group remove event
-
-Whenever group instance changes state in the system, `users` service will generate and publish new `remove` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693307172460-0"
- 2) 1) "updated_by"
- 2) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 3) "occurred_at"
- 4) "1693307172459828786"
- 5) "operation"
- 6) "group.remove"
- 7) "id"
- 8) "bc7fb023-70d5-41aa-bf73-3eab1cf001c9"
- 9) "status"
- 10) "disabled"
- 11) "updated_at"
- 12) "2023-08-29T11:06:12.429555Z"
-
- 1) "1693307172473-0"
- 2) 1) "id"
- 2) "bc7fb023-70d5-41aa-bf73-3eab1cf001c9"
- 3) "status"
- 4) "enabled"
- 5) "updated_at"
- 6) "2023-08-29T11:06:12.429555Z"
- 7) "updated_by"
- 8) "e1b982d8-a332-4bc2-aaff-4bbaa86880fc"
- 9) "occurred_at"
- 10) "1693307172473661564"
- 11) "operation"
- 12) "group.remove"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T18:38:40+03:00
-
- {"id":"cabccc8d-937b-4d92-832b-48d7a466e19e","occurred_at":1696520320583695115,"operation":"group.remove","status":"disabled","updated_at":"2023-10-05T15:38:40.56848Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
-
- Subject: events.magistrala.users Received: 2023-10-05T18:38:40+03:00
-
- {"id":"cabccc8d-937b-4d92-832b-48d7a466e19e","occurred_at":1696520320592509139,"operation":"group.remove","status":"enabled","updated_at":"2023-10-05T15:38:40.56848Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "id": "d9c550f9-e644-453b-af5b-1ab7e9a99d9d",
- "occurred_at": 1697532242559729288,
- "operation": "group.remove",
- "status": "disabled",
- "updated_at": "2023-10-17T08:44:02.552421Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### Policy authorize event
-
-Whenever policy is authorized, `users` service will generate new `authorize` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693311470724-0"
- 2) 1) "entity_type"
- 2) "client"
- 3) "object"
- 4) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 5) "actions"
- 6) "c_list"
- 7) "occurred_at"
- 8) "1693311470724174126"
- 9) "operation"
- 10) "policies.authorize"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T15:12:07+03:00
-
- {"action":"c_list","entity_type":"client","object":"clients","occurred_at":1696507927648459930,"operation":"policies.authorize"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "action": "g_list",
- "entity_type": "group",
- "object": "clients",
- "occurred_at": 1697536686571995884,
- "operation": "policies.authorize"
- }
- ```
-
-### Policy add event
-
-Whenever policy is added, `users` service will generate new `add` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693311470721-0"
- 2) 1) "operation"
- 2) "policies.add"
- 3) "owner_id"
- 4) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 5) "subject"
- 6) "12510af8-b6a7-410d-944c-9feded199d6d"
- 7) "object"
- 8) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 9) "actions"
- 10) "[g_add,c_list]"
- 11) "created_at"
- 12) "2023-08-29T12:17:50.715541Z"
- 13) "occurred_at"
- 14) "1693311470721394773"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.users Received: 2023-10-05T16:13:21+03:00
-
- {"actions":"[m_read]","object":"f565885c-826d-4c4c-9277-a3c8537aadff","occurred_at":1696511601827118557,"operation":"policies.add","subject":"0a5f2e21-1a8b-460e-bfa9-732e570df095"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "actions": "[c_list,c_update,c_delete]",
- "object": "d9c550f9-e644-453b-af5b-1ab7e9a99d9d",
- "occurred_at": 1697538038965204061,
- "operation": "policies.add",
- "subject": "df0a29f6-df00-46e8-bde5-cbdf418510da"
- }
- ```
-
-### Policy update event
-
-Whenever policy is updated, `users` service will generate new `update` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693312500101-0"
- 2) 1) "updated_at"
- 2) "2023-08-29T12:35:00.095028Z"
- 3) "occurred_at"
- 4) "1693312500101367995"
- 5) "operation"
- 6) "policies.update"
- 7) "owner_id"
- 8) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 9) "subject"
- 10) "12510af8-b6a7-410d-944c-9feded199d6d"
- 11) "object"
- 12) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 13) "actions"
- 14) "[g_add,c_list]"
- 15) "created_at"
- 16) "2023-08-29T12:17:50.715541Z"
- ```
-
-2. In rabbitmq streams
-
- ```json
- {
- "actions": "[g_list]",
- "object": "0f551d14-0efe-4b5e-bc96-b9cd834e91d1",
- "occurred_at": 1697538056924321702,
- "operation": "policies.update",
- "subject": "bd3f51f6-d84e-41d9-8205-f725c6b5e774"
- }
- ```
-
-### Policy remove event
-
-Whenever policy is removed, `users` service will generate new `remove` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693312590631-0"
- 2) 1) "occurred_at"
- 2) "1693312590631691388"
- 3) "operation"
- 4) "policies.delete"
- 5) "subject"
- 6) "12510af8-b6a7-410d-944c-9feded199d6d"
- 7) "object"
- 8) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 9) "actions"
- 10) "[g_add,c_list]"
- ```
-
-2. In rabbitmq streams
-
- ```json
- {
- "object": "0f551d14-0efe-4b5e-bc96-b9cd834e91d1",
- "occurred_at": 1697538064359063507,
- "operation": "policies.delete",
- "subject": "bd3f51f6-d84e-41d9-8205-f725c6b5e774"
- }
- ```
-
-### Policy list event
-
-Whenever policy list is fetched, `clients` service will generate new `list` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693312633649-0"
- 2) 1) "operation"
- 2) "policies.list"
- 3) "total"
- 4) "0"
- 5) "limit"
- 6) "10"
- 7) "offset"
- 8) "0"
- 9) "occurred_at"
- 10) "1693312633649171129"
- ```
-
-2. In rabbitmq streams
-
- ```json
- {
- "limit": 10,
- "occurred_at": 1697536690236286573,
- "offset": 0,
- "operation": "policies.list",
- "total": 0
- }
- ```
-
-## Clients Service
-
-For every operation that has side effects (that is changing service state) `clients` service will generate new event and publish it to Redis Stream called `magistrala.clients`. Every event has its own event ID that is automatically generated and `operation` field that can have one of the following values:
-
-- `client.create` for client creation
-- `client.update` for client update
-- `client.remove` for client change of state
-- `client.view` for client view
-- `client.list` for listing clients
-- `client.list_by_channel` for listing clients by channel
-- `client.identify` for client identification
-- `channel.create` for channel creation
-- `channel.update` for channel update
-- `channel.remove` for channel change of state
-- `channel.view` for channel view
-- `channel.list` for listing channels
-- `channel.list_by_client` for listing channels by client
-- `policy.authorize` for policy authorization
-- `policy.add` for policy creation
-- `policy.update` for policy update
-- `policy.remove` for policy deletion
-- `policy.list` for listing policies
-
-By fetching and processing these events you can reconstruct `clients` service state. If you store some of your custom data in `metadata` field, this is the perfect way to fetch it and process it. If you want to integrate through [docker-compose.yml][mg-docker-compose] you can use `magistrala-es-redis` service. Just connect to it and consume events from Redis Stream named `magistrala.clients`.
-
-### Client create event
-
-Whenever client is created, `clients` service will generate new `create` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) 1) "1693311470576-0"
- 2) 1) "operation"
- 2) "client.create"
- 3) "id"
- 4) "12510af8-b6a7-410d-944c-9feded199d6d"
- 5) "status"
- 6) "enabled"
- 7) "created_at"
- 8) "2023-08-29T12:17:50.566453Z"
- 9) "name"
- 10) "-broken-cloud"
- 11) "owner"
- 12) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 13) "metadata"
- 14) "{}"
- 15) "occurred_at"
- 16) "1693311470576589894"
- ```
-
- As you can see from this example, every odd field represents field name while every even field represents field value. This is standard event format for Redis Streams. If you want to extract `metadata` field from this event, you'll have to read it as string first and then you can deserialize it to some structured format.
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T15:41:04+03:00
-
- {"created_at":"2023-10-05T12:41:04.833207Z","id":"9745f2ea-f776-46b1-9b44-1cfd1ad4c6f1","metadata":"e30=","name":"d0","occurred_at":1696509664860397827,"operation":"client.create","owner":"0a5f2e21-1a8b-460e-bfa9-732e570df095","status":"enabled"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.453621Z",
- "id": "83c884cc-51b7-40ab-a98f-83ea93f4cdd6",
- "metadata": "e30=",
- "name": "-Maune-Tuttle",
- "occurred_at": 1697532232459167722,
- "operation": "client.create",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled"
- }
- ```
-
-### Client update event
-
-Whenever client instance is updated, `clients` service will generate new `update` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693311470669-0"
- 2) 1) "operation"
- 2) "client.update"
- 3) "updated_at"
- 4) "2023-08-29T12:17:50.665752Z"
- 5) "updated_by"
- 6) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 7) "owner"
- 8) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 9) "created_at"
- 10) "2023-08-29T12:17:50.566453Z"
- 11) "status"
- 12) "enabled"
- 13) "id"
- 14) "12510af8-b6a7-410d-944c-9feded199d6d"
- 15) "name"
- 16) "lingering-sea"
- 17) "metadata"
- 18) "{\"Update\":\"nameless-glitter\"}"
- 19) "occurred_at"
- 20) "1693311470669567023"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"created_at":"2023-10-05T15:38:40.264564Z","id":"47540f84-029b-436f-89b5-3c10f87e302b","metadata":"eyJVcGRhdGUiOiJCZXJuYXJkLUJyaWNrZXkifQ==","name":"Bence-Jefferson","occurred_at":1696520320614766498,"operation":"client.update","owner":"3264e965-3fe5-4d4e-a857-48de43551d2e","status":"enabled","updated_at":"2023-10-05T15:38:40.606662Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.453621Z",
- "id": "83c884cc-51b7-40ab-a98f-83ea93f4cdd6",
- "metadata": "eyJVcGRhdGUiOiJTdGV2ZW5zb24tTW9udHNpb24ifQ==",
- "name": "Marner-Shapiro",
- "occurred_at": 1697532242575070481,
- "operation": "client.update",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled",
- "updated_at": "2023-10-17T08:44:02.571677Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### Client update secret event
-
-Whenever client secret is updated, `clients` service will generate new `update_secret` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693311470676-0"
- 2) 1) "id"
- 2) "12510af8-b6a7-410d-944c-9feded199d6d"
- 3) "name"
- 4) "lingering-sea"
- 5) "metadata"
- 6) "{\"Update\":\"nameless-glitter\"}"
- 7) "status"
- 8) "enabled"
- 9) "occurred_at"
- 10) "1693311470676563107"
- 11) "operation"
- 12) "client.update_secret"
- 13) "updated_at"
- 14) "2023-08-29T12:17:50.672865Z"
- 15) "updated_by"
- 16) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 17) "owner"
- 18) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 19) "created_at"
- 20) "2023-08-29T12:17:50.566453Z"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"created_at":"2023-10-05T15:38:40.264564Z","id":"47540f84-029b-436f-89b5-3c10f87e302b","metadata":"eyJVcGRhdGUiOiJCZXJuYXJkLUJyaWNrZXkifQ==","name":"Bence-Jefferson","occurred_at":1696520320633637049,"operation":"client.update_secret","owner":"3264e965-3fe5-4d4e-a857-48de43551d2e","status":"enabled","updated_at":"2023-10-05T15:38:40.625663Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.453621Z",
- "id": "83c884cc-51b7-40ab-a98f-83ea93f4cdd6",
- "metadata": "eyJVcGRhdGUiOiJTdGV2ZW5zb24tTW9udHNpb24ifQ==",
- "name": "Marner-Shapiro",
- "occurred_at": 1697532242583980252,
- "operation": "client.update_secret",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled",
- "updated_at": "2023-10-17T08:44:02.580896Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### Client update tags event
-
-Whenever client tags are updated, `clients` service will generate new `update_tags` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693311470682-0"
- 2) 1) "operation"
- 2) "client.update_tags"
- 3) "owner"
- 4) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 5) "metadata"
- 6) "{\"Update\":\"nameless-glitter\"}"
- 7) "status"
- 8) "enabled"
- 9) "occurred_at"
- 10) "1693311470682522926"
- 11) "updated_at"
- 12) "2023-08-29T12:17:50.679301Z"
- 13) "updated_by"
- 14) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 15) "id"
- 16) "12510af8-b6a7-410d-944c-9feded199d6d"
- 17) "name"
- 18) "lingering-sea"
- 19) "tags"
- 20) "[morning-pine]"
- 21) "created_at"
- 22) "2023-08-29T12:17:50.566453Z"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"created_at":"2023-10-05T15:38:40.264564Z","id":"47540f84-029b-436f-89b5-3c10f87e302b","metadata":"eyJVcGRhdGUiOiJCZXJuYXJkLUJyaWNrZXkifQ==","name":"Bence-Jefferson","occurred_at":1696520320651750298,"operation":"client.update_tags","owner":"3264e965-3fe5-4d4e-a857-48de43551d2e","status":"enabled","tags":"[Kac-Kimma]","updated_at":"2023-10-05T15:38:40.643285Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.453621Z",
- "id": "83c884cc-51b7-40ab-a98f-83ea93f4cdd6",
- "metadata": "eyJVcGRhdGUiOiJTdGV2ZW5zb24tTW9udHNpb24ifQ==",
- "name": "Marner-Shapiro",
- "occurred_at": 1697532242593091501,
- "operation": "client.update_tags",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled",
- "tags": "[Donni-Planting]",
- "updated_at": "2023-10-17T08:44:02.589939Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### Client remove event
-
-Whenever client instance is removed from the system, `clients` service will generate and publish new `remove` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693311470689-0"
- 2) 1) "updated_by"
- 2) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 3) "occurred_at"
- 4) "1693311470688911826"
- 5) "operation"
- 6) "client.remove"
- 7) "id"
- 8) "12510af8-b6a7-410d-944c-9feded199d6d"
- 9) "status"
- 10) "disabled"
- 11) "updated_at"
- 12) "2023-08-29T12:17:50.679301Z"
-
- 1) "1693311470695-0"
- 2) 1) "operation"
- 2) "client.remove"
- 3) "id"
- 4) "12510af8-b6a7-410d-944c-9feded199d6d"
- 5) "status"
- 6) "enabled"
- 7) "updated_at"
- 8) "2023-08-29T12:17:50.679301Z"
- 9) "updated_by"
- 10) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 11) "occurred_at"
- 12) "1693311470695446948"
- ```
-
-2. In Nats JetsStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"id":"47540f84-029b-436f-89b5-3c10f87e302b","occurred_at":1696520320674227458,"operation":"client.remove","status":"disabled","updated_at":"2023-10-05T15:38:40.643285Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
-
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"id":"47540f84-029b-436f-89b5-3c10f87e302b","occurred_at":1696520320692289306,"operation":"client.remove","status":"enabled","updated_at":"2023-10-05T15:38:40.643285Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "id": "83c884cc-51b7-40ab-a98f-83ea93f4cdd6",
- "occurred_at": 1697532242603326333,
- "operation": "client.remove",
- "status": "disabled",
- "updated_at": "2023-10-17T08:44:02.589939Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### Client view event
-
-Whenever client is viewed, `clients` service will generate new `view` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693311470608-0"
- 2) 1) "operation"
- 2) "client.view"
- 3) "id"
- 4) "12510af8-b6a7-410d-944c-9feded199d6d"
- 5) "name"
- 6) "-broken-cloud"
- 7) "owner"
- 8) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 9) "metadata"
- 10) "{}"
- 11) "created_at"
- 12) "2023-08-29T12:17:50.566453Z"
- 13) "status"
- 14) "enabled"
- 15) "occurred_at"
- 16) "1693311470608701504"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T15:42:00+03:00
-
- {"created_at":"2023-10-05T12:41:04.833207Z","id":"9745f2ea-f776-46b1-9b44-1cfd1ad4c6f1","metadata":"e30=","name":"d0","occurred_at":1696509720925490970,"operation":"client.view","owner":"0a5f2e21-1a8b-460e-bfa9-732e570df095","status":"enabled"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.453621Z",
- "id": "83c884cc-51b7-40ab-a98f-83ea93f4cdd6",
- "metadata": "e30=",
- "name": "-Maune-Tuttle",
- "occurred_at": 1697532237490995357,
- "operation": "client.view",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled"
- }
- ```
-
-### Client list event
-
-Whenever client list is fetched, `clients` service will generate new `list` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693311470613-0"
- 2) 1) "occurred_at"
- 2) "1693311470613173088"
- 3) "operation"
- 4) "client.list"
- 5) "total"
- 6) "0"
- 7) "offset"
- 8) "0"
- 9) "limit"
- 10) "10"
- 11) "status"
- 12) "enabled"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"limit":10,"occurred_at":1696520320459999484,"offset":0,"operation":"client.list","status":"enabled","total":0}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "limit": 10,
- "occurred_at": 1697532237496534968,
- "offset": 0,
- "operation": "client.list",
- "status": "enabled",
- "total": 0
- }
- ```
-
-### Client list by channel event
-
-Whenever client list by channel is fetched, `clients` service will generate new `list_by_channel` event. This event will have the following format:
-
-```bash
-1) "1693312322620-0"
-2) 1) "operation"
- 2) "client.list_by_channel"
- 3) "total"
- 4) "0"
- 5) "offset"
- 6) "0"
- 7) "limit"
- 8) "10"
- 9) "channel_id"
- 10) "8d77099e-4911-4140-8555-7d3be65a1694"
- 11) "status"
- 12) "enabled"
- 13) "occurred_at"
- 14) "1693312322620481072"
-```
-
-### Client identify event
-
-Whenever client is identified, `clients` service will generate new `identify` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693312391155-0"
- 2) 1) "operation"
- 2) "client.identify"
- 3) "client_id"
- 4) "dc82d6bf-973b-4582-9806-0230cee11c20"
- 5) "occurred_at"
- 6) "1693312391155123548"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"occurred_at":1696520320934964056,"operation":"client.identify","client_id":"47540f84-029b-436f-89b5-3c10f87e302b"}
- ```
-
-### Channel create event
-
-Whenever channel instance is created, `clients` service will generate and publish new `create` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) 1) "1693311470584-0"
- 2) 1) "owner"
- 2) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 3) "name"
- 4) "-frosty-moon"
- 5) "metadata"
- 6) "{}"
- 7) "occurred_at"
- 8) "1693311470584416323"
- 9) "operation"
- 10) "channel.create"
- 11) "id"
- 12) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 13) "status"
- 14) "enabled"
- 15) "created_at"
- 16) "2023-08-29T12:17:50.57866Z"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T15:55:39+03:00
-
- {"created_at":"2023-10-05T12:55:39.175568Z","id":"45eb9f35-1360-4051-81e2-9582433a6607","metadata":"e30=","name":"hephaestus","occurred_at":1696510539182201160,"operation":"channel.create","owner":"97466511-6317-4c98-8d58-7bd78bcaf587","status":"enabled"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.461635Z",
- "id": "b9ae027e-9068-4bff-9ced-45a28351a1ce",
- "metadata": "e30=",
- "name": "-Dortch-Peckett",
- "occurred_at": 1697532232464401399,
- "operation": "channel.create",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled"
- }
- ```
-
-### Channel update event
-
-Whenever channel instance is updated, `clients` service will generate and publish new `update` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693311470701-0"
- 2) 1) "updated_by"
- 2) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 3) "owner"
- 4) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 5) "created_at"
- 6) "2023-08-29T12:17:50.57866Z"
- 7) "status"
- 8) "enabled"
- 9) "operation"
- 10) "channel.update"
- 11) "updated_at"
- 12) "2023-08-29T12:17:50.698278Z"
- 13) "metadata"
- 14) "{\"Update\":\"silent-hill\"}"
- 15) "occurred_at"
- 16) "1693311470701812291"
- 17) "id"
- 18) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 19) "name"
- 20) "morning-forest"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T16:00:29+03:00
-
- {"created_at":"2023-10-05T12:41:04.87198Z","id":"5f9d4b76-0717-4859-8ef8-6fcfb81f44d5","metadata":"e30=","name":"hestia","occurred_at":1696510829837578155,"operation":"channel.update","owner":"0a5f2e21-1a8b-460e-bfa9-732e570df095","status":"enabled","updated_at":"2023-10-05T13:00:29.828132Z","updated_by":"97466511-6317-4c98-8d58-7bd78bcaf587"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.461635Z",
- "id": "b9ae027e-9068-4bff-9ced-45a28351a1ce",
- "metadata": "eyJVcGRhdGUiOiJTaXNuZXktS29ra2F0In0=",
- "name": "Pelley-Staffing",
- "occurred_at": 1697532242622549294,
- "operation": "channel.update",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled",
- "updated_at": "2023-10-17T08:44:02.619432Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-Note that update channel event will contain only those fields that were updated using update channel endpoint.
-
-### Channel remove event
-
-Whenever channel instance is removed from the system, `clients` service will generate and publish new `remove` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693311470708-0"
- 2) 1) "status"
- 2) "disabled"
- 3) "updated_at"
- 4) "2023-08-29T12:17:50.698278Z"
- 5) "updated_by"
- 6) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 7) "occurred_at"
- 8) "1693311470708219296"
- 9) "operation"
- 10) "channel.remove"
- 11) "id"
- 12) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
-
- 1) "1693311470714-0"
- 2) 1) "occurred_at"
- 2) "1693311470714118979"
- 3) "operation"
- 4) "channel.remove"
- 5) "id"
- 6) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 7) "status"
- 8) "enabled"
- 9) "updated_at"
- 10) "2023-08-29T12:17:50.698278Z"
- 11) "updated_by"
- 12) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"id":"e4fa015f-bfad-4f41-bebe-142d3e938d3a","occurred_at":1696520320726205997,"operation":"channel.remove","status":"disabled","updated_at":"2023-10-05T15:38:40.702159Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
-
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"id":"e4fa015f-bfad-4f41-bebe-142d3e938d3a","occurred_at":1696520320786154457,"operation":"channel.remove","status":"enabled","updated_at":"2023-10-05T15:38:40.702159Z","updated_by":"3264e965-3fe5-4d4e-a857-48de43551d2e"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "id": "b9ae027e-9068-4bff-9ced-45a28351a1ce",
- "occurred_at": 1697532242632439430,
- "operation": "channel.remove",
- "status": "disabled",
- "updated_at": "2023-10-17T08:44:02.619432Z",
- "updated_by": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4"
- }
- ```
-
-### Channel view event
-
-Whenever channel is viewed, `clients` service will generate new `view` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693311470615-0"
- 2) 1) "id"
- 2) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 3) "owner"
- 4) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 5) "name"
- 6) "-frosty-moon"
- 7) "metadata"
- 8) "{}"
- 9) "created_at"
- 10) "2023-08-29T12:17:50.57866Z"
- 11) "status"
- 12) "enabled"
- 13) "occurred_at"
- 14) "1693311470615693019"
- 15) "operation"
- 16) "channel.view"
- ```
-
-2. In Nats JetStream
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"created_at":"2023-10-05T15:38:40.31444Z","id":"e4fa015f-bfad-4f41-bebe-142d3e938d3a","metadata":"e30=","name":"-Cech-Hargreaves","occurred_at":1696520320475816826,"operation":"channel.view","owner":"3264e965-3fe5-4d4e-a857-48de43551d2e","status":"enabled"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "created_at": "2023-10-17T08:43:52.461635Z",
- "id": "b9ae027e-9068-4bff-9ced-45a28351a1ce",
- "metadata": "e30=",
- "name": "-Dortch-Peckett",
- "occurred_at": 1697532237504403729,
- "operation": "channel.view",
- "owner": "b2941bd6-ca98-4c56-8d94-05fbf6a967c4",
- "status": "enabled"
- }
- ```
-
-### Channel list event
-
-Whenever channel list is fetched, `clients` service will generate new `list` event. This event will have the following format:
-
-1. In Redis
-
- ```bash
- 1) "1693311470619-0"
- 2) 1) "limit"
- 2) "10"
- 3) "status"
- 4) "enabled"
- 5) "occurred_at"
- 6) "1693311470619194337"
- 7) "operation"
- 8) "channel.list"
- 9) "total"
- 10) "0"
- 11) "offset"
- 12) "0"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"limit":10,"occurred_at":1696520320495779280,"offset":0,"operation":"channel.list","status":"enabled","total":0}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "limit": 10,
- "occurred_at": 1697532237512138449,
- "offset": 0,
- "operation": "channel.list",
- "status": "enabled",
- "total": 0
- }
- ```
-
-### Channel list by client event
-
-Whenever channel list by client is fetched, `clients` service will generate new `list_by_client` event. This event will have the following format:
-
-```bash
-1) "1693312299484-0"
-2) 1) "occurred_at"
- 2) "1693312299484000183"
- 3) "operation"
- 4) "channel.list_by_client"
- 5) "total"
- 6) "0"
- 7) "offset"
- 8) "0"
- 9) "limit"
- 10) "10"
- 11) "client_id"
- 12) "dc82d6bf-973b-4582-9806-0230cee11c20"
- 13) "status"
- 14) "enabled"
-```
-
-### Client Policy authorize event
-
-Whenever policy is authorized, `clients` service will generate new `authorize` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693311470724-0"
- 2) 1) "entity_type"
- 2) "client"
- 3) "object"
- 4) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 5) "actions"
- 6) "m_read"
- 7) "occurred_at"
- 8) "1693311470724174126"
- 9) "operation"
- 10) "policies.authorize"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T18:38:40+03:00
-
- {"actions":"m_write","entity_type":"client","object":"e4fa015f-bfad-4f41-bebe-142d3e938d3a","occurred_at":1696520320938561965,"operation":"policies.authorize"}
- ```
-
-3. In Rabbitmq streams
-
- ```json
- {
- "action": "c_list",
- "entity_type": "client",
- "object": "clients",
- "occurred_at": 1697536682155214702,
- "operation": "policies.authorize"
- }
- ```
-
-### Client Policy add event
-
-Whenever policy is added, `clients` service will generate new `add` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693311470721-0"
- 2) 1) "operation"
- 2) "policies.add"
- 3) "owner_id"
- 4) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 5) "subject"
- 6) "12510af8-b6a7-410d-944c-9feded199d6d"
- 7) "object"
- 8) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 9) "actions"
- 10) "[m_write,m_read]"
- 11) "created_at"
- 12) "2023-08-29T12:17:50.715541Z"
- 13) "occurred_at"
- 14) "1693311470721394773"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T15:41:04+03:00
-
- {"actions":"[m_write,m_read]","created_at":"2023-10-05T12:41:04.901355Z","object":"5f9d4b76-0717-4859-8ef8-6fcfb81f44d5","occurred_at":1696509664928590911,"operation":"policies.add","owner_id":"0a5f2e21-1a8b-460e-bfa9-732e570df095","subject":"9745f2ea-f776-46b1-9b44-1cfd1ad4c6f1"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "actions": "[m_read]",
- "created_at": "2023-10-17T10:19:44.704766Z",
- "object": "b9ae027e-9068-4bff-9ced-45a28351a1ce",
- "occurred_at": 1697537984720752374,
- "operation": "policies.add",
- "owner_id": "9eef7587-fb81-4db9-bedd-2ccc4f680532",
- "subject": "87b6a3c2-e498-477f-813e-102a97ae0141"
- }
- ```
-
-### Client Policy update event
-
-Whenever policy is updated, `clients` service will generate new `update` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693312500101-0"
- 2) 1) "updated_at"
- 2) "2023-08-29T12:35:00.095028Z"
- 3) "occurred_at"
- 4) "1693312500101367995"
- 5) "operation"
- 6) "policies.update"
- 7) "owner_id"
- 8) "fe2e5de0-9900-4ac5-b364-eae0c35777fb"
- 9) "subject"
- 10) "12510af8-b6a7-410d-944c-9feded199d6d"
- 11) "object"
- 12) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 13) "actions"
- 14) "[m_write,m_read]"
- 15) "created_at"
- 16) "2023-08-29T12:17:50.715541Z"
- ```
-
-2. In rabbitmq streams
-
- ```json
- {
- "actions": "[m_read,m_write]",
- "created_at": "2023-10-17T10:19:44.704766Z",
- "object": "b9ae027e-9068-4bff-9ced-45a28351a1ce",
- "occurred_at": 1697537993401523330,
- "operation": "policies.update",
- "owner_id": "9eef7587-fb81-4db9-bedd-2ccc4f680532",
- "subject": "87b6a3c2-e498-477f-813e-102a97ae0141",
- "updated_at": "2023-10-17T10:19:53.388419Z"
- }
- ```
-
-### Client Policy remove event
-
-Whenever policy is removed, `clients` service will generate new `remove` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693312590631-0"
- 2) 1) "occurred_at"
- 2) "1693312590631691388"
- 3) "operation"
- 4) "policies.delete"
- 5) "subject"
- 6) "12510af8-b6a7-410d-944c-9feded199d6d"
- 7) "object"
- 8) "8a85e2d5-e783-43ee-8bea-d6d0f8039e78"
- 9) "actions"
- 10) "[m_write,m_read]"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.clients Received: 2023-10-05T16:05:15+03:00
-
- {"actions":"[m_write,m_read]","object":"5f9d4b76-0717-4859-8ef8-6fcfb81f44d5","occurred_at":1696511115507500254,"operation":"policies.delete","subject":"9745f2ea-f776-46b1-9b44-1cfd1ad4c6f1"}
- ```
-
-3. In rabbitmq streams
-
- ```json
- {
- "actions": "[m_write,m_read]",
- "object": "053a122e-ea3b-42de-9f5f-9eef7e19491c",
- "occurred_at": 1697537995704396106,
- "operation": "policies.delete",
- "subject": "323a1297-5ca3-425e-b08f-b4bdf0925f10"
- }
- ```
-
-### Client Policy list event
-
-Whenever policy list is fetched, `clients` service will generate new `list` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693312633649-0"
- 2) 1) "operation"
- 2) "policies.list"
- 3) "total"
- 4) "0"
- 5) "limit"
- 6) "10"
- 7) "offset"
- 8) "0"
- 9) "occurred_at"
- 10) "1693312633649171129"
- ```
-
-2. In rabbitmq streams
-
- ```json
- {
- "limit": 10,
- "occurred_at": 1697536686568649276,
- "offset": 0,
- "operation": "policies.list",
- "total": 0
- }
- ```
-
-> **Note:** Every one of these events will omit fields that were not used or are not
-> relevant for specific operation. Also, field ordering is not guaranteed, so DO NOT
-> rely on it.
-
-## Bootstrap Service
-
-Bootstrap service publishes events to Redis Stream called `magistrala.bootstrap`. Every event from this service contains `operation` field which indicates one of the following event types:
-
-- `config.create` for configuration creation,
-- `config.update` for configuration update,
-- `config.remove` for configuration removal,
-- `client.bootstrap` for device bootstrap,
-- `client.state_change` for device state change,
-- `client.update_connections` for device connection update.
-
-If you want to integrate through [docker-compose.yml][bootstrap-docker-compose] you can use `magistrala-es-redis` service. Just connect to it and consume events from Redis Stream named `magistrala.bootstrap`.
-
-### Configuration create event
-
-Whenever configuration is created, `bootstrap` service will generate and publish new `create` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693313286544-0"
- 2) 1) "state"
- 2) "0"
- 3) "operation"
- 4) "config.create"
- 5) "name"
- 6) "demo"
- 7) "channels"
- 8) "[8d77099e-4911-4140-8555-7d3be65a1694]"
- 9) "client_cert"
- 10) "-----BEGIN ENCRYPTED PRIVATE KEY-----MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIc+VAU9JPnIkCAggAMAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECImSB+9qZ8dmBIIEyBW/rZlECWnEcMuTXhfJFe+3HP4rV+TXEEuigwCbtVPHWXoZj7KqGiOFgFaDL5Ne/GRwVD6geaTeQVl3aoHzo8mY0yuX2L36Ho2yHF/Bw89WT3hgP0lZ1lVO7O7n8DwybOaoJ+1S3akyb6OPbqcxJou1IGzKV1kz77R8V8nOFSd1BOepNbanGxVG8Jkgc37dQnICXwwaYkTx9PQBtSux1j3KgX0p+VAUNoUFi7N6b0MeO8iEuLU1dUiVwlH/jtitg0W3AvSV+5gezTT2VQW3CVlz6IBTPI1Rfl/3ss18Tao0NiPUmXMIgreBCamXvb0aJm8JxVbhoFYqWVNVocBD+n1+NwhCRlZM5Kgaes5S2JuFnjTAqEYytlQqEySbaN57XYCDNVmQz2iViz/+npuR9SCGwnNvV/TNsKRwav+0N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B2IJstTTF1OtZCrInjSus9ViOiM02Iz3ZmyglsMonJDlWeJL5jKBgqPbLR82IDhIY4IO6SqoVsWu4iWuLW5/TM3fdfYG3Wdvu7Suz7/anLAaMQEzKhObwgDdKmv4PkF75frex969CB1pQqSVnXmz4GrtxVUzWtlflaTSdSegpUXWLhG+jUNKTu+ptxDNM/JBxRNLSzdvsGbkI0qycOCliVpKkkvuiBGtiDWNax6KhV4/oRjkEkTRks9Xeko+q3uY4B//AGxsotsVhF5vhUDTOl5IX7a7wCPtbTGiaR79eprRzGnP9yP38djVrvXprJFU8P7GUr/f2qJt2jDYuCkaqAMsfjdu6YHitjj3ty4vrASgxJ0vsroWhjgiCwgASqM7GnweHSHy5/OZK8jCZX+g+B63Mu4ec+/nNnjvuLqBBZN/FSzXU5fVmYznfPaqW+1Xep+Aj1yGk3L3tvnKLc3sZ1HAJQEjud5dbME6e0JGxh5xOCnzWUR+YL/96KJAcgkxDJ1DxxHv0Uu/5kO5InOsPjs4YKuzqD4nUmGsFsJzTxG626wdGXJMO4YCRKkKtnNeWqMaslM3paN19/tTWyEbaDqc5mVzYLIb3Mzju+OV4GniDeVIvSIsXK5aFGj1PEhfCprQCqUzdNhFU8hF4kUVhn9dp0ExveT7btHSMlEZAWHRkDuLqaImpQkjYmwt90cxtdZwQvjTDtsFmQrvcSp8n1K3P5PwZpVtIw2UHpx+NjE8ZYwOozpXl/oOMzVTB8mi1dQGFkpac9cwnzCZof0ub4iutBeKc4WeEOytvY+CY7hc+/ncCprZ08nlkQarQV7jhfJj658GfBMLGzJtYkCrHwi/AoseIXa5W7eX+lz7O92H2M5QnEkPStQ9lsz2VkYA==-----END ENCRYPTED PRIVATE KEY-----"
- 13) "occurred_at"
- 14) "1693313286544243035"
- 15) "client_id"
- 16) "dc82d6bf-973b-4582-9806-0230cee11c20"
- 17) "content"
- 18) "{ \"server\": { \"address\": \"127.0.0.1\", \"port\": 8080 }, \"database\": { \"host\": \"localhost\", \"port\": 5432, \"username\": \"user\", \"password\": \"password\", \"dbname\": \"mydb\" }, \"logging\": { \"level\": \"info\", \"file\": \"app.log\" } }"
- 19) "owner"
- 20) "64fd20bf-e8fb-46bf-9b64-2a6572eda21b"
- 21) "external_id"
- 22) "209327A2FA2D47E3B05F118D769DC521"
- 23) "client_key"
- 24) "-----BEGIN ENCRYPTED PRIVATE KEY-----MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIc+VAU9JPnIkCAggAMAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECImSB+9qZ8dmBIIEyBW/rZlECWnEcMuTXhfJFe+3HP4rV+TXEEuigwCbtVPHWXoZj7KqGiOFgFaDL5Ne/GRwVD6geaTeQVl3aoHzo8mY0yuX2L36Ho2yHF/Bw89WT3hgP0lZ1lVO7O7n8DwybOaoJ+1S3akyb6OPbqcxJou1IGzKV1kz77R8V8nOFSd1BOepNbanGxVG8Jkgc37dQnICXwwaYkTx9PQBtSux1j3KgX0p+VAUNoUFi7N6b0MeO8iEuLU1dUiVwlH/jtitg0W3AvSV+5gezTT2VQW3CVlz6IBTPI1Rfl/3ss18Tao0NiPUmXMIgreBCamXvb0aJm8JxVbhoFYqWVNVocBD+n1+NwhCRlZM5Kgaes5S2JuFnjTAqEYytlQqEySbaN57XYCDNVmQz2iViz/+npuR9SCGwnNvV/TNsKRwav+0NC0pbf3LNk/KL9/X5ccmPhB5Rl7IS/v1BBLYX/jYWVN0dJiSA7fVIr9Acr7IbxWEQ2Y2qh1wdhayi4FBUHY3weivYSU3uGZizsSGJP/N6DutBgS1aXd5X/CqfF7VzRaKF4cfLO4XxTYUEjOztUNMN2XmW0o+ULjQmbouRPs/PIFmh6rc+h42m6p4SkjcsIKOy+mPTeJqhOVmYoMzO8+7mmXDOjFwvi/w97sdmbjII8Zn2iR/N8GuY23vv5h6LQ3tQ5kTA4IuPbYCVLeggd4iMM6TgpuJn0aG7yo4tDFqMeadCVhP2Bp3JQa8r3B2IJstTTF1OtZCrInjSus9ViOiM02Iz3ZmyglsMonJDlWeJL5jKBgqPbLR82IDhIY4IO6SqoVsWu4iWuLW5/TM3fdfYG3Wdvu7Suz7/anLAaMQEzKhObwgDdKmv4PkF75frex969CB1pQqSVnXmz4GrtxVUzWtlflaTSdSegpUXWLhG+jUNKTu+ptxDNM/JBxRNLSzdvsGbkI0qycOCliVpKkkvuiBGtiDWNax6KhV4/oRjkEkTRks9Xeko+q3uY4B//AGxsotsVhF5vhUDTOl5IX7a7wCPtbTGiaR79eprRzGnP9yP38djVrvXprJFU8P7GUr/f2qJt2jDYuCkaqAMsfjdu6YHitjj3ty4vrASgxJ0vsroWhjgiCwgASqM7GnweHSHy5/OZK8jCZX+g+B63Mu4ec+/nNnjvuLqBBZN/FSzXU5fVmYznfPaqW+1Xep+Aj1yGk3L3tvnKLc3sZ1HAJQEjud5dbME6e0JGxh5xOCnzWUR+YL/96KJAcgkxDJ1DxxHv0Uu/5kO5InOsPjs4YKuzqD4nUmGsFsJzTxG626wdGXJMO4YCRKkKtnNeWqMaslM3paN19/tTWyEbaDqc5mVzYLIb3Mzju+OV4GniDeVIvSIsXK5aFGj1PEhfCprQCqUzdNhFU8hF4kUVhn9dp0ExveT7btHSMlEZAWHRkDuLqaImpQkjYmwt90cxtdZwQvjTDtsFmQrvcSp8n1K3P5PwZpVtIw2UHpx+NjE8ZYwOozpXl/oOMzVTB8mi1dQGFkpac9cwnzCZof0ub4iutBeKc4WeEOytvY+CY7hc+/ncCprZ08nlkQarQV7jhfJj658GfBMLGzJtYkCrHwi/AoseIXa5W7eX+lz7O92H2M5QnEkPStQ9lsz2VkYA==-----END ENCRYPTED PRIVATE KEY-----"
- ```
-
-2. In Nats Jet Streams
-
- ```json
- Subject: events.magistrala.bootstrap Received: 2023-10-11T19:17:46+03:00
-
- {"client_cert":"-----BEGIN CERTIFICATE-----\nMIIEATCCAumgAwIBAgIUNl+p3eaPJsZRFvW/u5AGBLgx7YMwDQYJKoZIhvcNAQEL\nBQAwLjEsMCo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zjTN918IYrcSi3gr0NoUY/KuZverBZdSR/fS0vMHX\nQ/X7XGE2gOGrzqWN2dtEAmMrisfo9zUlimU+7SWeetOKa5JTtmSZGFWvCrvsnWkH\narZT59t3yJ7YqwbjRmaSC3Uq7veFBsIEKbszm0eeMCtNcSLuykmBM/8CgYEAwhDd\nS3OLj4J62PlSjyBHSDP2Zv5sG6jXDDRPo8HQWcWoOq2stnwgrblkEXpsSpaRaUP8\nQabEtkobckYx3OK6/0Q4c0A6I4lHQpm2m6K2o+8lsG/OwwNplXA+kpYuqUYEjgBl\nFiGblZCtyDPdd4PnHDBjKLUzOYxgRDxfVLLKcWUCgYEAm4+ypyellswqzZPmQAhL\nOtlLanVdjPkbqI0vmwv2Hv5eAzUNvZVwT40w70iUcjgekuvhWamJ6GChMOFE1x96\nFfN0Cd9hLYf7s9is5OI4oLPFJO+vnliVikCein1mMnHjHaVvU9nQJutSsoC5/opr\nzm5Fo4Wg+qT0Qs9hzVyrwLsCgYEAoTk9f6d4dDskMAnByuI4FgYFWL9ZtQjpz1vO\nJe+oVkxdXJJYgCpTQ8BXICYivTylhVxTv376wa6DasZiOm2qiNN2Slk7c7ZimzP0\nfwwIy9yr5Q6eKWk2WE4tzb4y+bIPqqEtWduF1BWkKkTcYqQUZljUqEcRTWgPueCm\nGkmG4fkCgYEAk1rI1pAdfdxLrKTGu2WRfr0UgNx/eUjVuL5GT3Bu092QLXwFc3Py\nsIu7vHRQY1ASGRDvlyx76Uc+mtmXhowwBL1fTiKcfgD3SbqRTw8rwJbF6MNB7fOH\nSWlA4wuzpwVvg0j2DoY5LbwMN7AbrGS451E14xUwpEWdIDChWw14qag=\n-----END RSA PRIVATE KEY-----","external_id":"889","name":"ariadne","occurred_at":1697041066438195084,"operation":"config.create","owner":"1058552c-3f6a-4bfe-827e-ecbcdc95d344","state":"0","client_id":"bb569875-a268-4ed4-b382-b88b181c61f3"}
- ```
-
-### Configuration update event
-
-Whenever configuration is updated, `bootstrap` service will generate and publish new `update` event. This event will have the following format:
-
-```bash
-1) "1693313985263-0"
-2) 1) "state"
- 2) "0"
- 3) "operation"
- 4) "config.update"
- 5) "client_id"
- 6) "dc82d6bf-973b-4582-9806-0230cee11c20"
- 7) "content"
- 8) "{ \"server\": { \"address\": \"127.0.0.1\", \"port\": 8080 }, \"database\": { \"host\": \"localhost\", \"port\": 5432, \"username\": \"user\", \"password\": \"password\", \"dbname\": \"mydb\" } }"
- 9) "name"
- 10) "demo"
- 11) "occurred_at"
- 12) "1693313985263381501"
-```
-
-### Certificate update event
-
-Whenever certificate is updated, `bootstrap` service will generate and publish new `update` event. This event will have the following format:
-
-```bash
-1) "1693313759203-0"
-2) 1) "client_key"
- 2) "dc82d6bf-973b-4582-9806-0230cee11c20"
- 3) "client_cert"
- 4) "-----BEGIN ENCRYPTED PRIVATE KEY-----MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIc+VAU9JPnIkCAggAMAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECImSB+9qZ8dmBIIEyBW/rZlECWnEcMuTXhfJFe+3HP4rV+TXEEuigwCbtVPHWXoZj7KqGiOFgFaDL5Ne/GRwVD6geaTeQVl3aoHzo8mY0yuX2L36Ho2yHF/Bw89WT3hgP0lZ1lVO7O7n8DwybOaoJ+1S3akyb6OPbqcxJou1IGzKV1kz77R8V8nOFSd1BOepNbanGxVG8Jkgc37dQnICXwwaYkTx9PQBtSux1j3KgX0p+VAUNoUFi7N6b0MeO8iEuLU1dUiVwlH/jtitg0W3AvSV+5gezTT2VQW3CVlz6IBTPI1Rfl/3ss18Tao0NiPUmXMIgreBCamXvb0aJm8JxVbhoFYqWVNVocBD+n1+NwhCRlZM5Kgaes5S2JuFnjTAqEYytlQqEySbaN57XYCDNVmQz2iViz/+npuR9SCGwnNvV/TNsKRwav+0NC0pbf3LNk/KL9/X5ccmPhB5Rl7IS/v1BBLYX/jYWVN0dJiSA7fVIr9Acr7IbxWEQ2Y2qh1wdhayi4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NnjvuLqBBZN/FSzXU5fVmYznfPaqW+1Xep+Aj1yGk3L3tvnKLc3sZ1HAJQEjud5dbME6e0JGxh5xOCnzWUR+YL/96KJAcgkxDJ1DxxHv0Uu/5kO5InOsPjs4YKuzqD4nUmGsFsJzTxG626wdGXJMO4YCRKkKtnNeWqMaslM3paN19/tTWyEbaDqc5mVzYLIb3Mzju+OV4GniDeVIvSIsXK5aFGj1PEhfCprQCqUzdNhFU8hF4kUVhn9dp0ExveT7btHSMlEZAWHRkDuLqaImpQkjYmwt90cxtdZwQvjTDtsFmQrvcSp8n1K3P5PwZpVtIw2UHpx+NjE8ZYwOozpXl/oOMzVTB8mi1dQGFkpac9cwnzCZof0ub4iutBeKc4WeEOytvY+CY7hc+/ncCprZ08nlkQarQV7jhfJj658GfBMLGzJtYkCrHwi/AoseIXa5W7eX+lz7O92H2M5QnEkPStQ9lsz2VkYA==-----END ENCRYPTED PRIVATE KEY-----"
- 9) "operation"
- 10) "cert.update"
- 11) "occurred_at"
- 12) "1693313759203076553"
-```
-
-### Configuration list event
-
-Whenever configuration list is fetched, `bootstrap` service will generate new `list` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693339274766-0"
- 2) 1) "occurred_at"
- 2) "1693339274766130265"
- 3) "offset"
- 4) "0"
- 5) "limit"
- 6) "10"
- 7) "operation"
- 8) "config.list"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.bootstrap Received: 2023-10-11T19:23:05+03:00
-
- {"external_id":"879","name":"aphrodite","occurred_at":1697042445469239430,"operation":"config.list","owner":"1058552c-3f6a-4bfe-827e-ecbcdc95d344","state":"0","client_id":"1f9c0d1d-0d6b-4a83-83b9-50845e557a85"}
- ```
-
-### Configuration view event
-
-Whenever configuration is viewed, `bootstrap` service will generate new `view` event. This event will have the following format:
-
-```bash
-1) 1) "1693339152105-0"
-2) 1) "client_id"
- 2) "74f00d13-d370-42c0-b528-04fff995275c"
- 3) "name"
- 4) "demo"
- 5)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vJCzhMQO8DeHZjO4oiiCEpRmBdkLDlZs81mykmyFEpjcmv4JD23HQ9IPi0/4Bsuu3SDXF4HC5/QYldaG0behBmMmDYuaQ0NHY5rpCnpZBteYT6V6lcBm/AIKwvz+N8fY2fDCKwKBgQDfBCjQw+SrMc8FI16Br7+KhsR7UuahEBt7LIiXfvom98//TuleafhuMWjBW9ujFIFXeHDLHWFQFFXdWO7HJVi33yPQQxGxcc5q0rUCLDPQga1Kcw8+R0Z5a4uu4olgQQKOepk+HB+obkmvOfb1HTaIaWu3jRawDk4cT50H8x/0hwKBgB63eB9LhNclj+Ur3djCBsNHcELp2r8D1pX99wf5qNjXeHMpfCmF17UbsAB7d6c0RK4tkZs4OGzDkGMYtKcaNbefRJSz8g6rNRtCK/7ncF3EYNciOUKsUK2H5/4gN8CC+mEDwRvvSd2k0ECwHTRYN8TNFYHURJ+gQ1Te7QAYsPCzAoGBAMZnbAY1Q/gK11JaPE2orFb1IltDRKB2IXh5Ton0ZCqhmOhMLQ+4t7DLPUKdXlsBZa/IIm5XehBg6VajbG0zulKLzO4YHuWEduwYON+4DNQxLWhBCBauOZ7+dcGUvYkeKoySYs6hznV9mlMHe1TuhCO8zHjpvBXOrlAR8VX5BXKz-----END PRIVATE KEY-----"
- 11) "state"
- 12) "0"
- 13) "operation"
- 14) "config.view"
- 15) "content"
- 16) "{\"device_id\": \"12345\",\"secure_connection\": true,\"sensor_config\": {\"temperature\": true,\"humidity\": true,\"pressure\": false}}"
- 17) "owner"
- 18) "b2972472-c93c-408f-9b77-0f8a81ee47af"
- 19) "occurred_at"
- 20) "1693339152105496336"
-```
-
-### Configuration remove event
-
-Whenever configuration is removed, `bootstrap` service will generate and publish new `remove` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1693339203771-0"
- 2) 1) "occurred_at"
- 2) "1693339203771705590"
- 3) "client_id"
- 4) "853f37b9-513a-41a2-a575-bbaa746961a6"
- 5) "operation"
- 6) "config.remove"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.bootstrap Received: 2023-10-11T19:24:50+03:00
-
- {"occurred_at":1697041490458439515,"operation":"config.remove","client_id":"6a08150a-cd19-460f-99c9-a760ee50aed3"}
- ```
-
-### Configuration remove handler
-
-Whenever a client is removed, `bootstrap` service will generate and publish new `config.remove_handler` event. This event will have the following format:
-
-```bash
-1) 1) "1693337955655-0"
-2) 1) "config_id"
- 2) "0198b458-573e-415a-aa05-052ddab9709d"
- 3) "operation"
- 4) "config.remove_handler"
- 5) "occurred_at"
- 6) "1693337955654969489"
-```
-
-### Client bootstrap event
-
-Whenever client is bootstrapped, `bootstrap` service will generate and publish new `bootstrap` event. This event will have the following format:
-
-```bash
-1) 1) "1693339161600-0"
-2) 1) "occurred_at"
- 2) "1693339161600369325"
- 3) "external_id"
- 4) "FF-41-EF-BC-90-BC"
- 5) "success"
- 6) "1"
- 7) "operation"
- 8) "client.bootstrap"
- 9) "client_id"
- 10) "74f00d13-d370-42c0-b528-04fff995275c"
- 11) "content"
- 12) "{\"device_id\": \"12345\",\"secure_connection\": true,\"sensor_config\": {\"temperature\": true,\"humidity\": true,\"pressure\": false}}"
- 13) "owner"
- 14) "b2972472-c93c-408f-9b77-0f8a81ee47af"
- 15) "name"
- 16) "demo"
- 17) "channels"
- 18) "[90aae157-d47f-4d71-9a68-b000c0025ae8]"
- 19) "ca_cert"
- 20) "-----BEGIN PRIVATE KEY-----MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDVYaZsyd76aSWZexY/OyX8hVdE+ruT3OZrE6gFSjDiaAA2Uf5/eHT1BJdR4LviooXix8vfc/g5CAN/z98zmUmAzx9lk5T4sRhJfqYQ2yDEt1tVDwD3RzL9RHXRWiZu4thk253jOpT15VFvOf5wE6mhVozFl9OetVJb4eqKbHx9RY0rMXwiBiCC2LcUtcp6rVjp4pK6VGjehA8siVX9bnRsIY776jDb/pm2n+y5G+bd1CifSdgTrr7QLKFlx0//5lyslmfUbf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YNciOUKsUK2H5/4gN8CC+mEDwRvvSd2k0ECwHTRYN8TNFYHURJ+gQ1Te7QAYsPCzAoGBAMZnbAY1Q/gK11JaPE2orFb1IltDRKB2IXh5Ton0ZCqhmOhMLQ+4t7DLPUKdXlsBZa/IIm5XehBg6VajbG0zulKLzO4YHuWEduwYON+4DNQxLWhBCBauOZ7+dcGUvYkeKoySYs6hznV9mlMHe1TuhCO8zHjpvBXOrlAR8VX5BXKz-----END PRIVATE KEY-----"
-
-```
-
-### Client change state event
-
-Whenever client's state changes, `bootstrap` service will generate and publish new `change state` event. This event will have the following format:
-
-1. In Redis Streams
-
- ```bash
- 1) "1555405294806-0"
- 2) 1) "client_id"
- 2) "63a110d4-2b77-48d2-aa46-2582681eeb82"
- 3) "state"
- 4) "0"
- 5) "timestamp"
- 6) "1555405294"
- 7) "operation"
- 8) "client.state_change"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.bootstrap Received: 2023-10-11T19:26:31+03:00
-
- {"occurred_at":1697041591648042067,"operation":"client.change_state","state":"0","client_id":"1f9c0d1d-0d6b-4a83-83b9-50845e557a85"}
- ```
-
-### Client update connections event
-
-Whenever client's list of connections is updated, `bootstrap` service will generate and publish new `update connections` event. This event will have the following format:
-
-```bash
-1) "1555405373360-0"
-2) 1) "operation"
- 2) "client.update_connections"
- 3) "client_id"
- 4) "63a110d4-2b77-48d2-aa46-2582681eeb82"
- 5) "channels"
- 6) "ff13ca9c-7322-4c28-a25c-4fe5c7b753fc, 925461e6-edfb-4755-9242-8a57199b90a5, c3642289-501d-4974-82f2-ecccc71b2d82"
- 7) "timestamp"
- 8) "1555405373"
-```
-
-### Channel update handler event
-
-Whenever channel is updated, `bootstrap` service will generate and publish new `update handler` event. This event will have the following format:
-
-```bash
-1) "1693339403536-0"
-2) 1) "operation"
- 2) "channel.update_handler"
- 3) "channel_id"
- 4) "0e602731-36ba-4a29-adba-e5761f356158"
- 5) "name"
- 6) "dry-sky"
- 7) "metadata"
- 8) "{\"log\":\"info\"}"
- 9) "occurred_at"
- 10) "1693339403536636387"
-```
-
-### Channel remove handler event
-
-Whenever channel is removed, `bootstrap` service will generate and publish new `remove handler` event. This event will have the following format:
-
-```bash
-1) "1693339468719-0"
-2) 1) "config_id"
- 2) "0198b458-573e-415a-aa05-052ddab9709d"
- 3) "operation"
- 4) "config.remove_handler"
- 5) "occurred_at"
- 6) "1693339468719177463"
-```
-
-## MQTT Adapter
-
-Instead of using heartbeat to know when client is connected through MQTT adapter one can fetch events from Redis Streams that MQTT adapter publishes. MQTT adapter publishes events every time client connects and disconnects to stream named `magistrala.mqtt`.
-
-Events that are coming from MQTT adapter have following fields:
-
-- `client_id` ID of a client that has connected to MQTT adapter,
-- `event_type` can have two possible values, connect and disconnect,
-- `instance` represents MQTT adapter instance.
-- `occurred_at` is in Epoch UNIX Time Stamp format.
-
-If you want to integrate through [docker-compose.yml][mg-docker-compose] you can use `magistrala-es-redis` service. Just connect to it and consume events from Redis Stream named `magistrala.mqtt`.
-
-Examples of connect event:
-
-1. In Redis Streams
-
- ```bash
- 1) 1) "1693312937469-0"
- 2) 1) "client_id"
- 1) "76a58221-e319-492a-be3e-b3d15631e92a"
- 2) "event_type"
- 3) "connect"
- 4) "instance"
- 5) ""
- 6) "occurred_at"
- 7) "1693312937469719069"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.mqtt Received: 2023-10-09T14:57:36+03:00
-
- {"event_type":"connect","instance":"","occurred_at":1696852656381976408,"client_id":"9b23fec0-41a2-44ed-af13-7c54706b3291"}
- ```
-
-Example of disconnect event:
-
-1. In Redis Streams
-
- ```bash
- 1) 1) "1693312937471-0"
- 2) 1) "client_id"
- 2) "76a58221-e319-492a-be3e-b3d15631e92a"
- 3) "event_type"
- 4) "disconnect"
- 5) "instance"
- 6) ""
- 7) "occurred_at"
- 8) "1693312937471064150"
- ```
-
-2. In Nats JetStreams
-
- ```json
- Subject: events.magistrala.mqtt Received: 2023-10-09T14:57:36+03:00
-
- {"event_type":"disconnect","instance":"","occurred_at":1696852656435238414,"client_id":"9b23fec0-41a2-44ed-af13-7c54706b3291"}
- ```
-
-[redis-streams]: https://redis.io/topics/streams-intro
-[mg-docker-compose]: https://github.com/absmach/magistrala/blob/main/docker/docker-compose.yaml
-[bootstrap-docker-compose]: https://github.com/absmach/magistrala/blob/main/docker/addons/bootstrap/docker-compose.yaml
+For tracking entity, channel, and group activity today — creation, updates, disabling, connectivity, role changes — see [Entities § Audit logs](/dev-guide/entities#audit-logs), which covers Atom's own audit log.
diff --git a/content/docs/dev-guide/dev-tools/messaging.mdx b/content/docs/dev-guide/dev-tools/messaging.mdx
index 7b0de66..3815e6d 100644
--- a/content/docs/dev-guide/dev-tools/messaging.mdx
+++ b/content/docs/dev-guide/dev-tools/messaging.mdx
@@ -7,9 +7,7 @@ keywords:
- HTTP
- CoAP
- WebSocket
- - NATS
- - RabbitMQ
- - Kafka
+ - FluxMQ
image: /img/mg-preview.png
---
@@ -390,153 +388,12 @@ it's subtopics.
**Note:** When using MQTT, it's recommended that you use standard MQTT wildcards `+` and `#`.
-## MQTT Broker
-
-
-The sections below (MQTT Broker, Message Broker, and their NATS/RabbitMQ/Kafka subsections)
-describe the previous pluggable-broker model. **FluxMQ** is now Magistrala's default message
-broker for both MQTT and general message exchange — NATS remains available only as a build-time
-alternative. See [Architecture](/dev-guide/architecture) and
-[Storage Architecture](/dev-guide/storage-architecture) for the current model. The content below
-is kept for historical reference only.
-
-
-Magistrala supports the MQTT protocol for message exchange. MQTT is a lightweight Publish/Subscribe messaging protocol used to connect restricted devices in low bandwidth, high-latency or unreliable networks. The publish-subscribe messaging pattern requires a message broker. The broker is responsible for distributing messages to and from clients connected to the MQTT adapter.
-
-Magistrala supports [MQTT version 3.1.1][mqtt-v3.1.1]. The MQTT adapter is based on [Eclipse Paho][paho] MQTT client library. The adapter is configured to use [nats][nats-mqtt] as the default MQTT broker, but you can use [vernemq][vernemq] too.
-
-### Configuration
-
-In the dev environment, docker profiles are preferred when handling different MQTT and message brokers supported by Magistrala.
-
-Magistrala uses two types of brokers:
-
-1. `MQTT_BROKER`: Handles MQTT communication between MQTT adapters and message broker.
-2. `MESSAGE_BROKER`: Manages communication between adapters and Magistrala writer services.
-
-`MQTT_BROKER` can be either `vernemq` or `nats`.
-`MESSAGE_BROKER` can be either `nats` or `rabbitmq`.
-
-Each broker has a unique profile for configuration. The available profiles are:
-
-- `vernemq_nats`: Uses `vernemq` as MQTT_BROKER and `nats` as MESSAGE_BROKER.
-- `vernemq_rabbitmq`: Uses `vernemq` as MQTT_BROKER and `rabbitmq` as MESSAGE_BROKER.
-- `nats_nats`: Uses `nats` as both MQTT_BROKER and MESSAGE_BROKER.
-- `nats_rabbitmq`: Uses `nats` as MQTT_BROKER and `rabbitmq` as MESSAGE_BROKER.
-
-The following command will run VerneMQ as an MQTT broker and Nats as a message broker:
-
-```bash
-MG_MQTT_BROKER_TYPE=vernemq MG_BROKER_TYPE=nats make run_latest
-```
-
-The following command will run NATS as an MQTT broker and RabbitMQ as a message broker:
-
-```bash
-MG_MQTT_BROKER_TYPE=nats MG_BROKER_TYPE=rabbitmq make run_latest
-```
-
-By default, NATS is used as an MQTT broker and RabbitMQ as a message broker.
-
-### Nats MQTT Broker
-
-NATS support for MQTT and it is designed to empower users to leverage their existing IoT deployments. NATS offers significant advantages in terms of security and observability when used end-to-end. NATS server as a drop-in replacement for MQTT is compelling. This approach allows you to retain your existing IoT investments while benefiting from NATS' secure, resilient, and scalable access to your streams and services.
-
-#### Architecture
-
-To enable MQTT support on NATS, JetStream needs to be enabled. This is done by default in Magistrala. This is because persistence is necessary for sessions and retained messages, even for QoS 0 retained messages. Communication between MQTT and NATS involves creating similar NATS subscriptions when MQTT clients subscribe to topics. This ensures that the interest is registered in the NATS cluster, and messages are delivered accordingly. When MQTT publishers send messages, they are converted to NATS subjects, and matching NATS subscriptions receive the MQTT messages.
-
-NATS supports up to QoS 1 subscriptions, where the server retains messages until it receives the PUBACK for the corresponding packet identifier. If PUBACK is not received within the "ack_wait" interval, the message is resent. The maximum value for "max_ack_pending" is 65535.
-
-NATS Server persists all sessions, even if they are created with the "clean session" flag. Sessions are identified by client identifiers. If two connections attempt to use the same client identifier, the server will close the existing connection and accept the new one, reducing the flapping rate.
-
-NATS supports MQTT in a NATS cluster, with the replication factor automatically set based on cluster size.
-
-#### Limitations
-
-- NATS does not support QoS 2 messages. Hence Magistrala inherently does not support QoS 2 messages.
-- MQTT wildcard "#" may cause the NATS server to create two subscriptions.
-- MQTT concurrent sessions may result in the new connection being evicted instead of the existing one.
-
## Message Broker
-Magistrala supports multiple message brokers for message exchange. Message brokers are used to distribute messages to and from clients connected to the different protocols adapters and writers. Writers, which are responsible for storing messages in the database, are connected to the message broker using wildcard subscriptions. This means that writers will receive all messages published to the message broker. Clients can subscribe to the message broker using topic and subtopic combinations. The message broker will then forward all messages published to the topic and subtopic combination to the client.
-
-Magistrala supports [NATS][nats], [RabbitMQ][rabbitmq] and [Kafka][kafka] as message brokers.
-
-### NATS JetStream
-
-Since Magistrala supports configurable message brokers, you can use Nats with JetStream enabled as a message broker. To do so, you need to set `MG_BROKER_TYPE` to `nats` and set `MG_NATS_URL` to the url of your nats instance. When using `make` command to start Magistrala `MG_BROKER_URL` is automatically set to `MG_NATS_URL`.
-
-Since Magistrala is using `nats:2.9.21-alpine` docker image with the following configuration:
-
-```erlang
-max_payload: 1MB
-max_connections: 1M
-port: $MG_NATS_PORT
-http_port: $MG_NATS_HTTP_PORT
-trace: true
-
-jetstream {
- store_dir: "/data"
- cipher: "aes"
- key: $MG_NATS_JETSTREAM_KEY
- max_mem: 1G
-}
-```
-
-These are the default values but you can change them by editing the configuration file. For more information about nats configuration checkout [official nats documentation][nats-jestream]. The health check endpoint is exposed on `MG_NATS_HTTP_PORT` and its `/healthz` path.
-
-#### NATS JetStream Architecture
-
-The main reason for using Nats with JetStream enabled is to have a distributed system with high availability and minimal dependencies. Nats is configure to run as the default message broker, but you can use any other message broker supported by Magistrala. Nats is configured to use JetStream, which is a distributed streaming platform built on top of nats. JetStream is used to store messages and to provide high availability. This makes nats to be used as the default event store, but you can use any other event store supported by Magistrala. Nats with JetStream enabled is also used as a key-value store for caching purposes. This makes nats to be used as the default cache store, but you can use any other cache store supported by Magistrala.
-
-This versatile architecture allows you to use nats alone for the MQTT broker, message broker, event store and cache store. This is the default configuration, but you can use any other MQTT broker, message broker, event store and cache store supported by Magistrala.
-
-### RabbitMQ
-
-Since Magistrala uses a configurable message broker, you can use RabbitMQ as a message broker. To do so, you need to set `MG_BROKER_TYPE` to `rabbitmq` and set `MG_RABBITMQ_URL` to the url of your RabbitMQ instance. When using `make` command to start Magistrala `MG_BROKER_URL` is automatically set to `MG_RABBITMQ_URL`.
-
-Since Magistrala is using `rabbitmq:3.9.20-management-alpine` docker image, the management console is available at port `MG_RABBITMQ_HTTP_PORT`
-
-#### RabbitMQ Architecture
-
-Magistrala has one exchange for the entire platform called `messages`. This exchange is of type `topic`. The exchange is `durable` i.e. it will survive broker restarts and remain declared when there are no remaining bindings. The exchange does not `auto-delete` when all queues have finished using it. When declaring the exchange `no_wait` is set to `false` which means that the broker will wait for a confirmation from the server that the exchange was successfully declared. The exchange is not `internal` i.e. other exchanges can publish messages to it.
-
-Magistrala uses topic-based routing to route messages to the appropriate queues. The routing key is in the format `channels..`. A few valid routing key examples: `channels.318BC587-A68B-40D3-9026-3356FA4E702C`, `channels.318BC587-A68B-40D3-9026-3356FA4E702C.bedroom.temperature`.
-
-The AMQP published message doesn't contain any headers. The message body is the payload of the message.
-
-When subscribing to messages from a channel, a queue is created with the name `channels..`. The queue is `durable` i.e. it will survive broker restarts and remain declared when there are no remaining consumers or bindings. The queue does not `auto-delete` when all consumers have finished using it. The queue is not `exclusive` i.e. it can be accessed in other connections. When declaring the queue we set `no_wait` to `false` which means that the broker waits for a confirmation from the server that the queue was successfully declared. The queue is not passive i.e. the server creates the queue if it does not exist.
-
-The queue is then bound to the exchange with the routing key `channels..`. The binding is not no-wait i.e. the broker waits for a confirmation from the server that the binding was successfully created.
-
-Once this is done, the consumer can start consuming messages from the queue with a specific client ID. The consumer is not `no-local` i.e. the server will not send messages to the connection that published them. The consumer is not `exclusive` i.e. the queue can be accessed in other connections. The consumer is `no-ack` i.e. the server acknowledges
-deliveries to this consumer prior to writing the delivery to the network.
-
-When Unsubscribing from a channel, the queue is unbound from the exchange and deleted.
-
-For more information and examples checkout [official nats.io documentation][nats], [official rabbitmq documentation][rabbitmq], [official vernemq documentation][vernemq] and [official kafka documentation][kafka].
-
-### Kafka
-
-Since Magistrala uses a configurable message broker, you can use Kafka as a message broker. To do so, you need to set `MG_BROKER_TYPE` to `kafka` and set `MG_KAFKA_URL` to the url of your Kafka instance. When using `make` command to start Magistrala `MG_BROKER_URL` is automatically set to `MG_KAFKA_URL`.
-
-Magistrala utilizes `spotify/kafka:latest` docker image. The image also exposes `kafka:9092` and `zookeeper:2181` ports. This is used for development purposes only. For production, it is assumed that you have your own Kafka cluster.
-
-#### Kafka Architecture
-
-The publisher implementation is based on the `segmentio/kafka-go` library. Publishing messages is well supported by the library, but subscribing to topics is not. The library does not provide a way to subscribe to all topics, but only to a specific topic. This is a problem because the Magistrala platform uses a topic per channel, and the number of channels is not known in advance. The solution is to use the Zookeeper library to get a list of all topics and then subscribe to each of them. The list of topics is obtained by connecting to the Zookeeper server and reading the list of topics from the `/brokers/topics` node. The first message published from the topic can be lost if subscription happens closely followed by publishing. After the subscription, we guarantee that all messages will be received.
-
-Magistrala publishes messages to Kafka using the `channels..` topic. A few valid topic examples: `channels.318BC587-A68B-40D3-9026-3356FA4E702C`, `channels.318BC587-A68B-40D3-9026-3356FA4E702C.bedroom.temperature`. All topics have a single partition and replication factor of 1. On publishing messages a topic is created and a writer is created for that topic. The writer is not closed after publishing a message. The writer is closed when the application is closed. The `batchSize` is set to 1, which means that messages are written to Kafka as soon as they are published. The `requiredAcks` is set to `RequireAll` which means that the server will wait for the leader to receive the message and wait for the full set of in-sync replicas to receive the message.
-
-On subscribing to messages from a channel, a reader is configured with the topic `channels..`. The reader is not closed after reading a message. The reader is closed when the application is closed. The `maxWait` is set to 1 second, which means that the reader will wait for 1 second for new data to come when fetching batches of messages from kafka. The `heartbeatInterval` is set to 1 second, which means that the reader will send the consumer group heartbeat update every 1 second. The `partitionWatchInterval` is set to 1 second, which means that the reader will check for partition changes every 1 second. The `sessionTimeout` is set to 1 second, which means that the coordinator will consider the consumer dead and initiate a rebalance if no heartbeat is received for 1 second. For wildcard topics since kafka does not support wildcards, Magistrala subscribes to all topics and filter the messages received.
-
-When Unsubscribing from a channel, the reader is closed.
-
-For more information and examples checkout [official nats.io documentation][nats], [official rabbitmq documentation][rabbitmq], [official vernemq documentation][vernemq] and [official kafka documentation][kafka].
+**FluxMQ** is Magistrala's message broker for both MQTT and general message exchange — see
+[Architecture](/dev-guide/architecture) and [Storage Architecture](/dev-guide/storage-architecture)
+for the current model.
-[nats-jestream]: https://docs.nats.io/nats-concepts/jetstream
[http-api]: https://docs.api.magistrala.absmach.eu/?urls.primaryName=api%2Fhttp.yaml&service=http.yaml
[mosquitto]: https://mosquitto.org
[paho]: https://www.eclipse.org/paho/
@@ -548,10 +405,4 @@ For more information and examples checkout [official nats.io documentation][nats
[paho-js]: https://www.eclipse.org/paho/index.php?page=clients/js/index.php
[mqttjs]: https://github.com/mqttjs/MQTT.js
[websocket-client]: http://www.hivemq.com/demos/websocket-client/
-[nats]: https://docs.nats.io/
-[rabbitmq]: https://www.rabbitmq.com/documentation.html
-[vernemq]: https://docs.vernemq.com/
-[kafka]: https://kafka.apache.org/documentation/
-[nats-mqtt]: https://docs.nats.io/running-a-nats-service/configuration/mqtt
-[mqtt-v3.1.1]: https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html
[certs]: /dev-guide/certs
diff --git a/content/docs/dev-guide/dev-tools/storage.mdx b/content/docs/dev-guide/dev-tools/storage.mdx
index 3811124..77b08b0 100644
--- a/content/docs/dev-guide/dev-tools/storage.mdx
+++ b/content/docs/dev-guide/dev-tools/storage.mdx
@@ -15,11 +15,10 @@ image: /img/mg-preview.png
---
-
-Postgres and Timescale (`postgres-writer`/`postgres-reader`, `timescale-writer`/`timescale-reader`)
-are the currently supported storage backends. `docker/addons/` no longer includes Cassandra,
-MongoDB, or InfluxDB writer/reader add-ons — the sections below describing them predate their
-removal and are kept for historical reference only.
+
+PostgreSQL and Timescale (`postgres-writer`/`postgres-reader`, `timescale-writer`/`timescale-reader`)
+are the storage backends shipped in `docker/addons/` today. The Cassandra, MongoDB, and InfluxDB
+sections below describe add-ons from an earlier release and aren't part of the current `docker/addons/`.
Magistrala currently supports these storage databases for messages:
diff --git a/content/docs/dev-guide/edge.mdx b/content/docs/dev-guide/edge.mdx
index 59ce054..bdf5e49 100644
--- a/content/docs/dev-guide/edge.mdx
+++ b/content/docs/dev-guide/edge.mdx
@@ -14,14 +14,13 @@ image: /img/mg-preview.png
---
-
-This page describes the pre-rename architecture (`magistrala-cli` with `users create`/`clients`
-subcommands, `Authorization: Client` headers, `gnatsd`) and predates the current CLI (`health,
-login, workspaces, channels, groups, authz, devices, gateways, devicetypes`). `Agent` and `Export`
-are maintained in their own separate repositories, [`github.com/absmach/agent`](https://github.com/absmach/agent)
-and [`github.com/absmach/export`](https://github.com/absmach/export) — the general concept
-(a gateway running local services that bridge to Magistrala) still applies; the commands, env
-vars, and API paths below are kept for historical reference only.
+
+`Agent` and `Export` are maintained in their own separate repositories,
+[`github.com/absmach/agent`](https://github.com/absmach/agent) and
+[`github.com/absmach/export`](https://github.com/absmach/export). The general concept described
+here — a gateway running local services that bridge to Magistrala — still applies; check those
+repositories for the current CLI commands, env vars, and API paths, since the examples below use
+an older client model.
Magistrala IoT platform provides services for supporting management of devices on the edge. Typically, IoT solution includes devices (sensors/actuators) deployed in far edge and connected through some proxy gateway. Although most devices could be connected to the Magistrala directly, using gateways decentralizes system, decreases load on the cloud and makes setup less difficult. Also, gateways can provide additional data processing, filtering and storage.
diff --git a/content/docs/dev-guide/entities.mdx b/content/docs/dev-guide/entities.mdx
index a26e073..356b103 100644
--- a/content/docs/dev-guide/entities.mdx
+++ b/content/docs/dev-guide/entities.mdx
@@ -140,7 +140,7 @@ Allowed examples: `temperature`, `meter-type:water`, `zone-A`
## Audit logs
-The old standalone `journal` service is gone. Entity/channel/group activity (creation, updates, disabling, connectivity, role changes) is now tracked by **Atom's own audit log**, exposed via a GraphQL query (`magistrala-ui`'s `packages/ui/src/lib/journal.ts`, which the UI's per-entity **Journals** tab calls):
+Entity/channel/group activity (creation, updates, disabling, connectivity, role changes) is tracked by **Atom's own audit log**, exposed via a GraphQL query (`magistrala-ui`'s `packages/ui/src/lib/journal.ts`, which the UI's per-entity **Journals** tab calls):
```graphql
query ObjectAuditLogs($targetKind: String!, $targetId: ID!, $event: String, $limit: Int, $offset: Int) {
@@ -160,9 +160,8 @@ query ObjectAuditLogs($targetKind: String!, $targetId: ID!, $event: String, $lim
`targetKind` follows Atom's own event-recording convention (`atom`: `src/graphql/{resources,entities,groups}.rs`): `"resource"` for Channels, `"group"` for Groups, `"entity"` for everything else (Devices, Users, Gateways, Device Types).
- This query is only available when the deployment targets Atom (`MG_ATOM_URL` set). Legacy
- deployments without Atom fall back to the old journal SDK — not documented here since that
- service no longer exists in this repository.
+ This query is only available when the deployment targets Atom (`MG_ATOM_URL` set). Deployments
+ without Atom configured do not have this audit log available.
## Attributes / Metadata
diff --git a/content/docs/dev-guide/getting-started.mdx b/content/docs/dev-guide/getting-started.mdx
index 8df01a0..0a4206e 100644
--- a/content/docs/dev-guide/getting-started.mdx
+++ b/content/docs/dev-guide/getting-started.mdx
@@ -16,13 +16,6 @@ image: /img/mg-preview.png
Welcome to the **Magistrala Developer Guide**! This guide provides comprehensive instructions for installing, building, running, and interacting with Magistrala, an advanced messaging platform. Follow the steps below to get started with Magistrala development, understand its architecture, and interact with the system.
-
- The example command *output* further down this page — service log lines like
- `magistrala-users`, `magistrala-clients`, `magistrala-broker`, and the `SpiceDB Schema
- Management` section — predates the Atom migration. Treat those specific blocks as illustrative
- history, not current output.
-
-
## Fast Start
To spin up Magistrala, run the following commands:
@@ -240,28 +233,21 @@ docker-compose -f docker/docker-compose.yml -f docker/docker-compose.custom1.yml
In the command above each successive file overrides the previous parameters.
-
- FluxMQ is now Magistrala's default message broker; NATS is only available as a build-time
- alternative. The override mechanism shown below still applies, but this specific example
- targets the legacy `nats` service and won't apply to a default FluxMQ setup.
-
-
-A practical example in our case would be to enable debugging and tracing in NATS so that we can see better how are the messages moving around.
+A practical example in our case would be overriding one of the [FluxMQ](#message-broker) broker
+nodes — say, to disable its restart policy while you're actively debugging it.
-`docker-compose.nats-debugging.yml`
+`docker-compose.fluxmq-debug.yml`
```yaml
-version: "3"
-
services:
- nats:
- command: --debug -DV
+ fluxmq-node1:
+ restart: "no"
```
When we have the override files in place, to compose the whole infrastructure including the persistent volumes we can execute:
```bash
-docker-compose -f docker/docker-compose.yml -f docker/docker-compose.nats-debugging.yml up -d
+docker-compose -f docker/docker-compose.yml -f docker/docker-compose.fluxmq-debug.yml up -d
```
>**Note:** Please store your customizations to some folder outside the Magistrala's source folder and maybe add them to some other git repository. You can always apply your customizations by pointing to the right file using `docker-compose -f ...`.
@@ -284,105 +270,16 @@ Build `magistrala-cli` by following the [CLI guide][cli].
### Step 6 - Provision the System
-
- `magistrala-cli provision test` and the example output below are from the pre-Atom CLI. There is
- no `provision` command in the current CLI. To provision a workspace with devices and channels
- today, use [`workspaces create`](/dev-guide/cli/workspaces-cli),
- [`devices create`](/dev-guide/cli/devices-cli), and [`channels
- create`](/dev-guide/cli/channels-cli) directly.
-
-
-Output of the old command followed this pattern (kept for historical reference only):
-
-```json
-{
- "created_at": "2023-04-04T08:02:47.686337Z",
- "credentials": {
- "identity": "crazy_feistel@email.com",
- "secret": "12345678"
- },
- "id": "0216df07-8f08-40ef-ba91-ff0e700f387a",
- "name": "crazy_feistel",
- "status": "enabled",
- "updated_at": "2023-04-04T08:02:47.686337Z"
-}
-
-
-{
- "access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA1OTYyNjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJhY2Nlc3MifQ.EpaFDcRjYAHwqhejLfay5ju8L1a7VdhXKohUlwTv7YTeOK-ClfNNx6KznV05Swdj6lgvbmVAfe0wz2JMpfMjdw",
- "access_type": "Bearer",
- "refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA2ODE3NjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJyZWZyZXNoIn0.3xcrkIBbi2a8firNHtnK6I8sBBOgrQ6XBa3x7cybKc6omOuqrkkNjXGjKU9tgShvjpfCWT48AR1VqO_VxJxL8g"
-}
-
-
-[
- {
- "created_at": "2023-04-04T08:02:47.81865461Z",
- "credentials": {
- "secret": "fc9473d8-6756-4fcc-968f-ea43cd0b803b"
- },
- "id": "5d5e593b-7629-4cc3-bebc-b20d8ab9dbef",
- "name": "d0",
- "owner": "0216df07-8f08-40ef-ba91-ff0e700f387a",
- "status": "enabled",
- "updated_at": "2023-04-04T08:02:47.81865461Z"
- },
- {
- "created_at": "2023-04-04T08:02:47.818661382Z",
- "credentials": {
- "secret": "56a4b1bd-9750-42b3-a3cb-cf5ee2b86fe4"
- },
- "id": "45048a8e-c602-4e91-9556-a9d3af6617fb",
- "name": "d1",
- "owner": "0216df07-8f08-40ef-ba91-ff0e700f387a",
- "status": "enabled",
- "updated_at": "2023-04-04T08:02:47.818661382Z"
- }
-]
-
-
-[
- {
- "created_at": "2023-04-04T08:02:47.857619Z",
- "id": "a31e16f8-343c-4366-8b4f-c95e190937f4",
- "name": "c0",
- "owner_id": "0216df07-8f08-40ef-ba91-ff0e700f387a",
- "status": "enabled",
- "updated_at": "2023-04-04T08:02:47.857619Z"
- },
- {
- "created_at": "2023-04-04T08:02:47.867336Z",
- "id": "e20ad0bb-c490-47dd-9366-fb8ffd56c5dc",
- "name": "c1",
- "owner_id": "0216df07-8f08-40ef-ba91-ff0e700f387a",
- "status": "enabled",
- "updated_at": "2023-04-04T08:02:47.867336Z"
- }
-]
-
-```
-
-In the Magistrala system terminal (where docker compose is running) you should see following logs:
+Provision a workspace with devices and channels using the CLI:
```bash
-...
-magistrala-users | {"level":"info","message":"Method register_client with id 0216df07-8f08-40ef-ba91-ff0e700f387a using token took 87.335902ms to complete without errors.","ts":"2023-04-04T08:02:47.722776862Z"}
-magistrala-users | {"level":"info","message":"Method issue_token of type Bearer for client crazy_feistel@email.com took 55.342161ms to complete without errors.","ts":"2023-04-04T08:02:47.783884818Z"}
-magistrala-users | {"level":"info","message":"Method identify for token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA1OTYyNjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJhY2Nlc3MifQ.EpaFDcRjYAHwqhejLfay5ju8L1a7VdhXKohUlwTv7YTeOK-ClfNNx6KznV05Swdj6lgvbmVAfe0wz2JMpfMjdw with id 0216df07-8f08-40ef-ba91-ff0e700f387a took 1.389463ms to complete without errors.","ts":"2023-04-04T08:02:47.817018631Z"}
-magistrala-clients | {"level":"info","message":"Method create_clients 2 clients using token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA1OTYyNjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJhY2Nlc3MifQ.EpaFDcRjYAHwqhejLfay5ju8L1a7VdhXKohUlwTv7YTeOK-ClfNNx6KznV05Swdj6lgvbmVAfe0wz2JMpfMjdw took 48.137759ms to complete without errors.","ts":"2023-04-04T08:02:47.853310066Z"}
-magistrala-users | {"level":"info","message":"Method identify for token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA1OTYyNjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJhY2Nlc3MifQ.EpaFDcRjYAHwqhejLfay5ju8L1a7VdhXKohUlwTv7YTeOK-ClfNNx6KznV05Swdj6lgvbmVAfe0wz2JMpfMjdw with id 0216df07-8f08-40ef-ba91-ff0e700f387a took 302.571µs to complete without errors.","ts":"2023-04-04T08:02:47.856820523Z"}
-magistrala-clients | {"level":"info","message":"Method create_channel for 2 channels using token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA1OTYyNjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJhY2Nlc3MifQ.EpaFDcRjYAHwqhejLfay5ju8L1a7VdhXKohUlwTv7YTeOK-ClfNNx6KznV05Swdj6lgvbmVAfe0wz2JMpfMjdw took 15.340692ms to complete without errors.","ts":"2023-04-04T08:02:47.872089509Z"}
-magistrala-users | {"level":"info","message":"Method identify for token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA1OTYyNjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJhY2Nlc3MifQ.EpaFDcRjYAHwqhejLfay5ju8L1a7VdhXKohUlwTv7YTeOK-ClfNNx6KznV05Swdj6lgvbmVAfe0wz2JMpfMjdw with id 0216df07-8f08-40ef-ba91-ff0e700f387a took 271.162µs to complete without errors.","ts":"2023-04-04T08:02:47.875812318Z"}
-magistrala-clients | {"level":"info","message":"Method add_policy for client with id 5d5e593b-7629-4cc3-bebc-b20d8ab9dbef using token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA1OTYyNjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJhY2Nlc3MifQ.EpaFDcRjYAHwqhejLfay5ju8L1a7VdhXKohUlwTv7YTeOK-ClfNNx6KznV05Swdj6lgvbmVAfe0wz2JMpfMjdw took 28.632906ms to complete without errors.","ts":"2023-04-04T08:02:47.904041832Z"}
-magistrala-users | {"level":"info","message":"Method identify for token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA1OTYyNjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJhY2Nlc3MifQ.EpaFDcRjYAHwqhejLfay5ju8L1a7VdhXKohUlwTv7YTeOK-ClfNNx6KznV05Swdj6lgvbmVAfe0wz2JMpfMjdw with id 0216df07-8f08-40ef-ba91-ff0e700f387a took 269.959µs to complete without errors.","ts":"2023-04-04T08:02:47.906989497Z"}
-magistrala-clients | {"level":"info","message":"Method add_policy for client with id 5d5e593b-7629-4cc3-bebc-b20d8ab9dbef using token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA1OTYyNjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJhY2Nlc3MifQ.EpaFDcRjYAHwqhejLfay5ju8L1a7VdhXKohUlwTv7YTeOK-ClfNNx6KznV05Swdj6lgvbmVAfe0wz2JMpfMjdw took 6.303771ms to complete without errors.","ts":"2023-04-04T08:02:47.910594262Z"}
-magistrala-users | {"level":"info","message":"Method identify for token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA1OTYyNjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJhY2Nlc3MifQ.EpaFDcRjYAHwqhejLfay5ju8L1a7VdhXKohUlwTv7YTeOK-ClfNNx6KznV05Swdj6lgvbmVAfe0wz2JMpfMjdw with id 0216df07-8f08-40ef-ba91-ff0e700f387a took 364.448µs to complete without errors.","ts":"2023-04-04T08:02:47.912905436Z"}
-magistrala-clients | {"level":"info","message":"Method add_policy for client with id 45048a8e-c602-4e91-9556-a9d3af6617fb using token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODA1OTYyNjcsImlhdCI6MTY4MDU5NTM2NywiaWRlbnRpdHkiOiJjcmF6eV9mZWlzdGVsQGVtYWlsLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjAyMTZkZjA3LThmMDgtNDBlZi1iYTkxLWZmMGU3MDBmMzg3YSIsInR5cGUiOiJhY2Nlc3MifQ.EpaFDcRjYAHwqhejLfay5ju8L1a7VdhXKohUlwTv7YTeOK-ClfNNx6KznV05Swdj6lgvbmVAfe0wz2JMpfMjdw took 7.73352ms to complete without errors.","ts":"2023-04-04T08:02:47.920205467Z"}
-...
-
+magistrala-cli workspaces create "Acme IoT" --token $TOKEN
+magistrala-cli devices create '{"name":"Temperature Sensor 1"}' --token $TOKEN
+magistrala-cli channels create "Telemetry Channel" --token $TOKEN
```
-This proves that these provisioning commands were sent from the CLI to the Magistrala system.
+See the [Workspaces](/dev-guide/cli/workspaces-cli), [Devices](/dev-guide/cli/devices-cli), and
+[Channels](/dev-guide/cli/channels-cli) CLI guides for the full set of options.
### Step 7 - Interact with Magistrala
@@ -390,32 +287,18 @@ With Magistrala running, you can now send messages.
#### Send Messages
-
- There is no `messages` command in the current CLI. Send messages over the platform's protocol
- adapters (HTTP, MQTT, CoAP, WebSocket) directly instead — see [Architecture § Who
- Connects](/dev-guide/architecture#who-connects). The example below is kept for historical
- reference only.
-
-
-Once system is provisioned, a device can start sending messages on a channel. The old command looked like:
+Once a device is connected to a channel, it can publish messages over any of the platform's
+protocol adapters (HTTP, MQTT, CoAP, WebSocket). For example, over HTTP:
```bash
-magistrala-cli messages send
+curl -sSiX POST http://localhost/http/m//c/ \
+-H "Content-Type: application/senml+json" \
+-H "Authorization: Client " \
+-d '[{"bn":"some-base-name:","bt":1.276020076001e+09, "bu":"A","bver":5, "n":"voltage","u":"V","v":120.1}, {"n":"current","t":-5,"v":1.2}, {"n":"current","t":-4,"v":1.3}]'
```
-In the Magistrala system terminal you should see following logs:
-
-```bash
-...
-magistrala-clients | {"level":"info","message":"Method authorize_by_key for channel with id a31e16f8-343c-4366-8b4f-c95e190937f4 by client with secret fc9473d8-6756-4fcc-968f-ea43cd0b803b took 7.048706ms to complete without errors.","ts":"2023-04-04T08:06:09.750992633Z"}
-magistrala-broker | [1] 2023/04/04 08:06:09.753072 [TRC] 192.168.144.11:60616 - cid:10 - "v1.18.0:go" - <<- [PUB channels.a31e16f8-343c-4366-8b4f-c95e190937f4 261]
-magistrala-broker | [1] 2023/04/04 08:06:09.754037 [TRC] 192.168.144.11:60616 - cid:10 - "v1.18.0:go" - <<- MSG_PAYLOAD: ["\n$a31e16f8-343c-4366-8b4f-c95e190937f4\x1a$5d5e593b-7629-4cc3-bebc-b20d8ab9dbef\"\x04http*\xa6\x01[{\"bn\":\"some-base-name:\",\"bt\":1.276020076001e+09, \"bu\":\"A\",\"bver\":5, \"n\":\"voltage\",\"u\":\"V\",\"v\":120.1}, {\"n\":\"current\",\"t\":-5,\"v\":1.2}, {\"n\":\"current\",\"t\":-4,\"v\":1.3}]0\xd9\xe6\x8b\xc9Ø\xab\xa9\x17"]
-magistrala-broker | [1] 2023/04/04 08:06:09.755550 [TRC] 192.168.144.13:58572 - cid:8 - "v1.18.0:go" - ->> [MSG channels.a31e16f8-343c-4366-8b4f-c95e190937f4 1 261]
-magistrala-http | {"level":"info","message":"Method publish to channel a31e16f8-343c-4366-8b4f-c95e190937f4 took 15.979094ms to complete without errors.","ts":"2023-04-04T08:06:09.75232571Z"}
-...
-```
-
-This proves that messages have been correctly sent through the system via the protocol adapter (`magistrala-http`).
+See [Messaging](/user-guide/messaging) for the other protocol adapters, and the [API
+reference](/dev-guide/api#messages) for the full Messages API.
## Managing Microservices
@@ -469,43 +352,9 @@ GOOS=linux GOARCH=arm GOARM=7 make
## Message Broker
-
- This section describes the previous NATS-based local dev setup. **FluxMQ** is now Magistrala's
- default message broker; NATS remains available only as a build-time alternative. See
- [Architecture](/dev-guide/architecture) for the current model. The content below is kept for
- historical reference only.
-
-
-Magistrala uses NATS as it's default central message bus. For development purposes (when not run via Docker), it expects that NATS is installed on the local system.
-
-To do this execute:
-
-```bash
-go install github.com/nats-io/nats-server/v2@latest
-```
-
-This will install `nats-server` binary that can be simply run by executing:
-
-```bash
-nats-server
-```
-
-### Switching Brokers
-
-To use an alternative broker (e.g., RabbitMQ or VerneMQ) you need to set the env variable:
-
-- `MG_BROKER_TYPE=`
-
-**Supported Brokers:**
-
-- `nats` (default)
-- `rabbitmq`
-- `vernemq`
-
-```bash
-MG_BROKER_TYPE= make
-MG_BROKER_TYPE= make run
-```
+[FluxMQ](https://github.com/absmach/fluxmq) is Magistrala's message broker and event stream,
+handling MQTT, WebSocket, HTTP, CoAP, and AMQP protocol adapters — see
+[Architecture](/dev-guide/architecture) for the full model.
### MQTT Broker
@@ -559,17 +408,7 @@ Magistrala depends on several infrastructural services, notably the default mess
## Conclusion
-With Magistrala installed and running, you can now explore its messaging capabilities, test interactions, and extend the system as needed
-
----
-
-## Authorization schema management
-
-
- There is no SpiceDB deployment. Authorization is now provided by Atom — see
- [Architecture § Identity & Access Control](/dev-guide/architecture#identity--access-control).
- The SpiceDB schema workflow below is kept for historical reference only.
-
+With Magistrala installed and running, you can now explore its messaging capabilities, test interactions, and extend the system as needed. For authorization and access control, see [Authorization](/dev-guide/authorization).
[docker]: https://docs.docker.com/install/
[docker-compose]: https://docs.docker.com/compose/install/
diff --git a/content/docs/dev-guide/services/consumers.mdx b/content/docs/dev-guide/services/consumers.mdx
index e53da33..3b49f6b 100644
--- a/content/docs/dev-guide/services/consumers.mdx
+++ b/content/docs/dev-guide/services/consumers.mdx
@@ -1,35 +1,20 @@
---
title: Consumers
-description: Process, store and notify messages in Magistrala.
+description: Process and store messages in Magistrala using the TimescaleDB and PostgreSQL writers.
keywords:
- Consumers
- Writers
- - Notifiers
- TimescaleDB
- PostgreSQL
- - SMTP
- - SMPP
- - Subscriptions
image: /img/mg-preview.png
---
-
- There is no standalone `cmd/consumers` binary — `consumers/` is a library package imported by
- `cmd/timescale-writer` and `cmd/postgres-writer`. The **Writers** section below is current. The
- **Notifiers** section (SMTP/SMPP) is not: `consumers/notifiers/*` still exists as source but
- nothing wires it up to a running service. The current mechanism for the one notification
- Magistrala still sends (workspace-invitation emails) is Atom, not this package.
-
-
-The **Consumers Service** in Magistrala handles the processing, storage, and notification of messages received from various channels. It is divided into two primary groups:
-
-- **Writers:** Responsible for storing data in databases like TimescaleDB and PostgreSQL.
-- **Notifiers:** Send notifications via channels like SMTP, SMPP, etc.
-
-Consumers process messages in two primary ways:
+There is no standalone `cmd/consumers` binary — `consumers/` is a library package imported by
+`cmd/timescale-writer` and `cmd/postgres-writer`.
-- **Blocking Consumers:** Synchronously process messages (e.g., store data in a database).
-- **Async Consumers:** Asynchronously process messages (e.g., send notifications).
+The **Consumers Service** in Magistrala handles the processing and storage of messages received
+from various channels via **Writers**, which persist data to databases like TimescaleDB and
+PostgreSQL as messages arrive.
## Writers
@@ -85,148 +70,3 @@ consumer := postgres.New(db)
consumer.ConsumeBlocking(ctx, messages)
```
-## Notifiers
-
-
- Nothing in the current codebase imports this package outside of itself — it is not part of any
- running service. Kept below for reference only; do not treat it as a supported feature.
-
-
-Notifiers are responsible for sending real-time alerts or notifications when specific conditions are met. They ensure that critical messages reach users or systems promptly.
-
-### **SMTP Notifier**
-
-Sends email notifications based on incoming messages, ideal for system alerts, reports, or status updates.
-Email is universally supported, making it a reliable method for sending critical notifications to users worldwide. It is useful for automated alerts in monitoring systems, such as error reports, status changes, or threshold breaches.
-
-#### **Key Features of the SMTP Notifier**
-
-- **Rich Content:** Customizable email content templates.
-- **Error Handling:** Robust error reporting for failed deliveries.
-
-For example:
-
-```go
-import "github.com/absmach/magistrala/consumers/notifiers/smtp"
-
-agent := // initialize SMTP agent
-notifier := smtp.New(agent)
-notifier.Notify("from@example.com", []string{"to@example.com"}, message)
-```
-
-### **SMPP Notifier**
-
-Sends SMS notifications via the SMPP (Short Message Peer-to-Peer) protocol, commonly used for high-throughput SMS delivery.
-
-SMS has high open rates and is effective for time-sensitive alerts like OTPs, system failures, or emergency notifications. It also works across different mobile networks, enabling communication with users in remote or offline areas.
-
-#### **Key Features of the SMPP Notifier**
-
-- **Delivery Reports:** Supports message tracking.
-- **International Support:** Handles different encoding formats.
-
-For example:
-
-```go
-import "github.com/absmach/magistrala/consumers/notifiers/smpp"
-
-config := smpp.Config{Address: "smpp.server.com", Username: "user", Password: "pass"}
-notifier := smpp.New(config)
-notifier.Notify("1234", []string{"5678"}, message)
-```
-
-## Subscriptions API
-
-
- Part of the same unused `consumers/notifiers` package — `consumers/notifiers/api/transport.go`
- exists but isn't mounted by any running service, so these endpoints are not actually reachable
- today.
-
-
-The Subscriptions API in Magistrala allows users to manage subscriptions, enabling selective notifications based on specific topics.
-
-A subscription is usually of the format:
-
-```go
-// Subscription represents a user Subscription.
-type Subscription struct {
- ID string
- OwnerID string
- Contact string
- Topic string
-}
-```
-
-### **Create a Subscription**
-
-Creates a new subscription give a topic and contact.
-
-```bash
-curl -X POST http://localhost:8000/subscriptions -H "Authorization: Bearer " -d '{"contact": "user@example.com", "topic": "alerts"}'
-```
-
-### **View Subscription**
-
-Retrieves a subscription with the provided id.
-
-```bash
-curl -X GET http://localhost:8000/subscriptions/ -H "Authorization: Bearer "
-```
-
-Expect the response to be of the format:
-
-```json
-{
- "id": "01EWDVKBQSG80B6PQRS9PAAY35",
- "owner_id": "18167738-f7a8-4e96-a123-58c3cd14de3a",
- "topic": "topic.subtopic",
- "contact": "user@example.com"
-}
-```
-
-### **List Subscriptions**
-
-List subscriptions given list parameters.
-
-```bash
-curl -X GET http://localhost:8000/subscriptions -H "Authorization: Bearer "
-```
-
-Optional Query Parameters:
-
-- `?topic=alerts` - Filter subscriptions by topic.
-- `?offset=0&limit=10` - For pagination.
-
-An example with filters:
-
-```bash
-curl -X GET "http://localhost:8000/subscriptions?topic=alerts&limit=5" \
- -H "Authorization: Bearer "
-```
-
-Expect the response to be of the format:
-
-```json
-{
- "subscriptions": [
- {
- "id": "01EWDVKBQSG80B6PQRS9PAAY35",
- "owner_id": "18167738-f7a8-4e96-a123-58c3cd14de3a",
- "topic": "topic.subtopic",
- "contact": "user@example.com"
- }
- ],
- "total": 0,
- "offset": 0,
- "limit": 0
-}
-```
-
-### **Remove a Subscription**
-
-Delete a subscription using its ID. This will stop notifications for the specific topic.
-
-```bash
-curl -X DELETE http://localhost:8000/subscriptions/ \
- -H "Authorization: Bearer "
-```