Skip to main content

ADR 0005: Friendship stream consumers

Status​

Accepted.

Context​

After phase 3, social-service published friendship events that nobody production-ready consumed. The product needed an in-app notification for friend requests and feed activity when a request is accepted.

Decision​

  1. notification-service consumes splick.streams.social.friend-request-sent and friend-request-accepted.
  2. feed-service consumes friend-request-accepted.
  3. Each service has its own consumer group and dedupes on envelope eventId.
  4. Side effects persist in notification.notifications and feed.feed_activities.

Groups:

  • notification-service.friend-request-sent
  • notification-service.friend-request-accepted
  • feed-service.friend-request-accepted

Runtime transport remains STREAMS.

Consequences​

Friendship events have real side effects. Notification and feed can evolve their read models without social importing their tables. More consumer groups must be watched for lag.

Rollback​

Stop the consumer, leave the stream intact, fix the handler, replay. Do not change the social event contract to "undo" a bad consumer.