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

Implement custom partitioning #3

Closed
simonswine opened this issue Jul 23, 2020 · 1 comment · Fixed by #16
Closed

Implement custom partitioning #3

simonswine opened this issue Jul 23, 2020 · 1 comment · Fixed by #16

Comments

@simonswine
Copy link
Collaborator

We should implement a custom partitioning based on ideally client_ip and metric_name hash.

This can be done through a MessageRouter https://github.com/apache/pulsar-client-go/blob/2a6c3e70fe5f445714d47d9e4b404b8dae853ae4/pulsar/producer.go#L90

@simonswine
Copy link
Collaborator Author

Instead of implementing a MessageRouter we should use the key on the message: https://github.com/apache/pulsar-client-go/blob/f7ca912897cc7d1a04dbc1602a40552dd2b8f77a/pulsar/message.go#L31

@simonswine simonswine added this to the v0.1 milestone Jul 31, 2020
simonswine added a commit that referenced this issue Aug 6, 2020
For de-duplicating messages from HA replicas, we need to ensure order of
remote writes. To achieve that we are using the same partition key for
metrics using the same labels (expect replica labels) and tenant-ids.

Fixes #3
simonswine added a commit that referenced this issue Aug 6, 2020
For de-duplicating messages from HA replicas, we need to ensure order of
remote writes. To achieve that we are using the same partition key for
metrics using the same labels (expect replica labels) and tenant-ids.

Fixes #3
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 a pull request may close this issue.

1 participant