Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace subscriptions in schema with verb subscribe metadata #3528

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

matt2e
Copy link
Collaborator

@matt2e matt2e commented Nov 26, 2024

Subscriptions are now defined on a verb. Schema no longer lists subscriptions.

go:

//ftl:subscribe <topic> from=(beginning|latest) (deadletter)?

java and kotlin:

// Separating options from @Subscription allows us to use generated subscription types for external topics
@Subscription(topic="verbName")
@SubscriptionOptions(from = FromOffset.LATEST, deadLetter = false) // deadLetter can be left out

Other changes:

  • FromOffset and DeadLetter options have no effect yet
  • Only one subscription per verb
  • Updated docs

@ftl-robot ftl-robot mentioned this pull request Nov 26, 2024
@matt2e matt2e added the skip-proto-breaking PRs with this label will skip the breaking proto check label Nov 26, 2024
@matt2e matt2e force-pushed the matt2e/from-latest branch 8 times, most recently from d23c5ce to 35a04fc Compare November 27, 2024 05:33
@matt2e matt2e marked this pull request as ready for review November 27, 2024 05:36
@matt2e matt2e requested review from a team and alecthomas as code owners November 27, 2024 05:36
@matt2e matt2e requested review from stuartwdouglas and wesbillman and removed request for a team November 27, 2024 05:36
isDarkMode,
),
),
// ...(module.subscriptions || []).map((subscription: Subscription) =>
Copy link
Collaborator Author

@matt2e matt2e Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wesbillman This PR removes Subscriptions as a standalone concept in the schema. And I'm not sure how we want that to affect the console... I've just removed the broken parts for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-proto-breaking PRs with this label will skip the breaking proto check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant