Skip to content

Expand attribute coverage for SDK spec options #5

@jmarbutt

Description

@jmarbutt

Problem

Attribute-based function registration only supports a subset of SDK spec options:

  • ✅ Retry
  • ✅ Concurrency
  • ✅ Rate limit

Missing attributes for:

  • ❌ Throttle
  • ❌ Debounce
  • ❌ Batch
  • ❌ Cancellation
  • ❌ Idempotency
  • ❌ Priority

Location: Inngest/Internal/InngestFunctionRegistry.cs:200-231

Users who prefer the attribute-first pattern can't express large parts of the SDK spec today.

Suggested Solution

Add attributes for each missing option:

[Throttle(Limit = 10, Period = "1m", Key = "event.data.userId")]
[Debounce(Period = "5s", Key = "event.data.userId")]
[Batch(MaxSize = 100, Timeout = "10s")]
[Cancellation(Event = "order/cancelled", Match = "async.data.orderId == event.data.orderId")]
[Idempotency(Key = "event.data.orderId")]
[Priority(Run = "event.data.priority")]
public class MyFunction : IInngestFunction { }

Priority

Low - users can still use the fluent API for these options. This is a convenience/consistency improvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions