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

Add option to provide pubsub configuration for topic #382

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

marcwickenden
Copy link
Contributor

Description

Provides the ability to configure the creation of the GCP PubSub topic. Specifically I wanted to be able to specify message retention. This paves the way for replaying messages to enable projections to resync.

Affected Components

  • Event Bus

Related Issues

Nothing specific but begins to address projection errors. Only for GCP though.

Solution and Design

The pubsub client also has a CreateTopicWithConfig function which takes an additional argument of a TopicConfig struct. By adding an additional function to the gcp eventbus package (WithTopicOptions, copypasta of WithPubSubOptions but updates different struct property) we can supply a TopicConfig struct as an option to NewEventBus().

Steps to test and verify

  1. Run TestEventBusWithConfigIntegration test in eventbus_test.go.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 68.831% when pulling 9b8a8fd on marcwickenden:main into 1a72481 on looplab:main.

@maxekman maxekman merged commit d9133a0 into looplab:main Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants