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

Correctly parse blockchain subscription name when delivering events #1375

Closed
wants to merge 1 commit into from

Conversation

awrichar
Copy link
Contributor

This ensures the namespace can be accurately extracted.

Fixes #1374

This ensures the namespace can be accurately extracted.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
@@ -334,7 +334,7 @@ func buildBatchPin(ctx context.Context, event *blockchain.Event, params *BatchPi
func GetNamespaceFromSubName(subName string) string {
var parts = strings.Split(subName, "-")
// Subscription names post version 1.1 are in the format `ff-sub-<namespace>-<listener ID>`
if len(parts) != 4 {
if len(parts) < 4 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a possibility that an old subscription could still hit this codepath if it contains a UUID?

Copy link
Contributor Author

@awrichar awrichar Jul 26, 2023

Choose a reason for hiding this comment

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

@awrichar
Copy link
Contributor Author

Replaced by #1378

@awrichar awrichar closed this Jul 26, 2023
@awrichar awrichar deleted the blockchain-ns branch July 26, 2023 18:14
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.

Blockchain events are delivered to every namespace by blockchain plugin
2 participants