-
Notifications
You must be signed in to change notification settings - Fork 4
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
Publish message on specific partition #166
Conversation
Previously control-characters have been used for simplicity, but this makes it hard to create variables in PI in order to correlate the message. For that we need printable characters. this commit adjustes the calculation to find correct and suitable correlation keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Just one comment about verbose logging
go-chaos/cmd/publish.go
Outdated
partitionIdFromKey := internal.ExtractPartitionIdFromKey(messageResponse.Key) | ||
|
||
if Verbose { | ||
fmt.Printf("Message was sent and returned key %d, which corresponds to partition: %d\n", messageResponse.Key, partitionIdFromKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Very nice. I'm wondering if it shouldn't always be printed regardless, as if a test were to fail due to a partition mismatch, it would be pretty important info
Adds a new feature to publish a message with a printable correlation key to an specific (given) partition. This is useful if we want to experiment with message correlation, for example disconnect certain partitions etc.
Usage