Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ For details about compatibility between different releases, see the **Commitment

### Changed

- Rate limiting for downlink queue operations (`DownlinkQueuePush`, `DownlinkQueueReplace`) is now applied at the application level instead of per-device. This may result in more `ResourceExhausted` (429) errors when multiple devices under the same application perform downlink queue operations concurrently.

### Deprecated

### Removed
Expand Down
10 changes: 10 additions & 0 deletions pkg/ttnpb/application_interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,13 @@ func (m *DownlinkQueueRequest) IDString() string {
}
return ids.IDString()
}

// RateLimitKey implements ratelimit.Keyer.
// Returns an application-level key to enable rate limiting per application for downlink queue operations.
func (m *DownlinkQueueRequest) RateLimitKey() string {
ids := m.EndDeviceIds
if ids == nil {
return ""
}
return "application:" + ids.GetApplicationIds().IDString()
}
Loading