Skip to content

chore: add v1.19 notifications channel routing and Broadcasting/queue retry docs - #198

Open
goravel-coder wants to merge 11 commits into
masterfrom
upgrade/v1.19.0
Open

chore: add v1.19 notifications channel routing and Broadcasting/queue retry docs#198
goravel-coder wants to merge 11 commits into
masterfrom
upgrade/v1.19.0

Conversation

@goravel-coder

@goravel-coder goravel-coder commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Document the v1.19 notification channel-routing API: built-in channels are referenced through the notification.ChannelMail / notification.ChannelDatabase constants (so a channel typo fails at compile time instead of silently dropping a route), the notifiable model prefers the typed MailRoutable.RouteNotificationForMail and DatabaseRoutable.RouteNotificationForDatabase routes with RouteNotificationFor as fallback, empty routes surface NotificationMailEmptyRoute / NotificationDatabaseEmptyRoute errors, and the database-connection contract is renamed to NotificationWithDatabaseConnection.
  • Document the new v1.19 Broadcasting module: drivers, public/private/presence channels, authorization, dispatching and receiving broadcasts, per-event retry/backoff contracts, and the make:event --broadcast / --broadcast --now scaffolding, with the Broadcasting page added to the sidebar.
  • Document the v1.19 queue rework (release-based ShouldRetry retries with the attempt count persisted in the reservation, a driver-agnostic retry_after crashed-worker recovery option, millisecond-precision job timestamps, and the new ReservedJob.Attempts()/Release() contract) and the "Upgrading To v1.19 From v1.18" guide, with the notifications feature intro updated to the renamed contracts and channel constants.

Why

Goravel v1.19 introduces a first-party notifications module, and its channel-routing API now ships typed contracts. The notifications guide previously showed raw "mail"/"database" literals and a switch-based RouteNotificationFor; it now documents the notification.ChannelMail / notification.ChannelDatabase constants and the typed notifiable-side routes (MailRoutable.RouteNotificationForMail, DatabaseRoutable.RouteNotificationForDatabase) that take precedence over RouteNotificationFor, including the exact fallback chain and the NotificationMailEmptyRoute / NotificationDatabaseEmptyRoute errors. The connection contract is renamed to NotificationWithDatabaseConnection so DatabaseRoutable unambiguously means the typed route.

This matters because routing failures now surface at compile time (constants) or as explicit errors (empty routes) instead of silently dropping delivery, and the docs mirror the framework's real precedence semantics from framework#1535. The v1.19 upgrade guide's notifications intro is kept in sync with the renamed contracts, and the Broadcasting/queue rework documentation from the same release round out the v1.19 upgrade path.

package models

import (
  "strconv"

  "github.com/goravel/framework/contracts/notification"
)

type User struct {
  ID   uint
  Mail string
  Name string
}

// MailRoutable: the type-safe mail delivery route, preferred over RouteNotificationFor.
func (r *User) RouteNotificationForMail(notification notification.Notification) map[string]string {
  return map[string]string{r.Mail: r.Name}
}

// DatabaseRoutable: the type-safe database delivery route, preferred over RouteNotificationFor.
func (r *User) RouteNotificationForDatabase() string {
  return strconv.FormatUint(uint64(r.ID), 10)
}

@goravel-coder goravel-coder changed the title chore: add v1.19 upgrade guide and Broadcasting/queue retry docs chore: restructure v1.19 upgrade guide and Broadcasting/queue retry docs Aug 6, 2026
@goravel-coder goravel-coder changed the title chore: restructure v1.19 upgrade guide and Broadcasting/queue retry docs chore: add v1.19 notifications channel routing and Broadcasting/queue retry docs Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants