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

Tool to replay a pull subscription to a topic #350

Merged
merged 1 commit into from May 16, 2024

Conversation

tcnghia
Copy link
Collaborator

@tcnghia tcnghia commented May 11, 2024

This tool uses the local gcloud credentials to listen to a pull subscription (intended for the pull subscription we created by default for each dead letter topic), and send it back to a topic (the original topic).

Example usage:

❯ go run . --source=nghia-...-dlq-pjxu --dest=nghia-...-us-central1 --projectID nghia-...
Listening for messages.
Found message: { "content": "this is a test" }
Found message: { "content": "this is a test" }
Found message: { "content": "this is a test" }
Found message: { "content": "this is a test" }
Found message: { "content": "this is a test" }
Found message: { "content": "this is a test" }
Found message: { "content": "this is a test" }
Found message: { "content": "this is a test" }
Found message: { "content": "this is a test" }
Replayed message: { "content": "this is a test" }
Replayed message: { "content": "this is a test" }
Replayed message: { "content": "this is a test" }
Replayed message: { "content": "this is a test" }
Replayed message: { "content": "this is a test" }
Replayed message: { "content": "this is a test" }
Replayed message: { "content": "this is a test" }
Replayed message: { "content": "this is a test" }
Replayed message: { "content": "this is a test" }
Found message: { "content": "this is a test" }
Replayed message: { "content": "this is a test" }
No messages received in the last 10s . Exiting.

@tcnghia tcnghia requested a review from found-it May 11, 2024 00:31
Signed-off-by: Nghia Tran <tcnghia@gmail.com>
@imjasonh imjasonh merged commit 3e90d0e into chainguard-dev:main May 16, 2024
79 checks passed
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.

None yet

3 participants