---
id: bookworm.{env}.rating.feedback-create
name: Feedback Created Channel
version: 1.0.0
type: topic
summary: |
  Kafka topic owned by the contributor team carrying Rating API feedback-created
  events consumed by Catalog API to update book rating summaries.
owners:
  - catalog-experience-team
badges:
  - content: Kafka
    backgroundColor: blue
    textColor: blue
  - content: Topic
    backgroundColor: teal
    textColor: teal
address: bookworm.{env}.rating.feedback-create
parameters:
  env:
    enum:
      - development
      - staging
      - production
    default: development
    examples:
      - development
      - staging
      - production
    description: BookWorm deployment environment.
deliveryGuarantee: at-least-once
protocols:
  - kafka
deadLetterChannel:
  id: bookworm.{env}.catalog.dead-letter-queue
  version: 1.0.0
---

## Purpose & Scope

This topic transports customer feedback-created events published by [[service|rating-api]] within the Reviews bounded context. [[service|catalog-api]] consumes these events to project the new rating into the book's summary. If the referenced book does not exist in Catalog, [[service|catalog-api]] emits a compensation event to [[channel|bookworm.&#123;env&#125;.catalog.book-update-rating-failed]] rather than dead-lettering.

## Channel Specification

| Property                               | Value                                                                           |
| :------------------------------------- | :------------------------------------------------------------------------------ |
| **Bounded Context / Owner**            | [[domain\|reviews]] / [[team\|catalog-experience-team]]                         |
| **Channel Type**                       | Topic                                                                           |
| **Address Pattern**                    | `bookworm.{env}.rating.feedback-create`                                         |
| **Parameters**                         | `env` (`development`, `staging`, `production`; default: `development`)          |
| **Protocol & Envelope Format**         | Kafka + CloudEvents JSON (`application/json`)                                   |
| **Partition Key & Ordering Guarantee** | Keyed by `bookId`; preserves per-book rating update ordering within a partition |
| **Delivery Semantics**                 | At-least-once                                                                   |
| **Dead-Letter Channel**                | [[channel\|bookworm.&#123;env&#125;.catalog.dead-letter-queue]]                 |

## Messages & Participants

| Message                                    | Type  | Producer                | Consumer(s)              | Consumer Group           |
| :----------------------------------------- | :---- | :---------------------- | :----------------------- | :----------------------- |
| [[event\|FeedbackCreatedIntegrationEvent]] | Event | [[service\|rating-api]] | [[service\|catalog-api]] | Catalog service consumer |

## Ordering, Retries & Failure Handling

- **Partition-key ordering:** Keying by `bookId` ensures rating additions and deletions for the same book are ordered per partition relative to concurrent updates.
- **Transient retries:** [[service|catalog-api]] applies bounded retries with backoff on transient database or concurrency faults.
- **Immediate DLQ routing:** Deserialization errors, malformed payloads, or exhausted retries route to [[channel|bookworm.&#123;env&#125;.catalog.dead-letter-queue]] (missing-book business rejections route to [[channel|bookworm.&#123;env&#125;.catalog.book-update-rating-failed]] instead).
- **Consumer idempotency:** [[service|catalog-api]] guards against duplicate feedback projection; verify the current book rating summary before manual replay.

## Channel Details & Visualization

<ChannelInformation />

<NodeGraph />

## Related Documentation

- [[channel|bookworm.&#123;env&#125;.catalog.dead-letter-queue]] — Consumer dead-letter queue
- [[channel|bookworm.&#123;env&#125;.rating.feedback-delete]] — Paired feedback deletion topic
- [[channel|bookworm.&#123;env&#125;.catalog.book-update-rating-failed]] — Missing-book compensation topic
- [[service|rating-api]] — Feedback producer
- [[service|catalog-api]] — Rating projection consumer
- [[flow|feedback-publication]] — End-to-end feedback publication flow
- [[doc|arc42/08-crosscutting-concepts/002-contracts-and-messaging]] — Messaging standards and idempotency rules
