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

Cleanup unused bindings for DB #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

bmario
Copy link
Member

@bmario bmario commented Jun 3, 2021

This patch tries to remove unused queue bindings, though we need to discuss some issues.

  • Is it possible to reliably derive the RabbitMQ Rest API Url from the managment_url?
  • Corner case: If a metric is removed from a database, but is still being actively published to MetricQ, message will end up in the queue, until, during the db.register, it gets eventually deleted. So, a db-hta might receive some, according to its current configuration, unexpected messages.
  • Corner case: The database needs to be restarted for this to take effect. I'm not sure whether this is a requirement from the db-hta or just a fuckup in this patch.

Fixes #21

class RabbitMQRestAPI:
def __init__(self, server: URL, data_vhost: str):
self.http_api_url = (
URL(server).with_scheme("https" if server.scheme == "amqps" else "http").with_port(15672 if server.port else None)
Copy link
Member Author

Choose a reason for hiding this comment

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

This thing is a mess, and it doesn't even work - I had to patch the docker-compose.

@bmario bmario marked this pull request as ready for review December 17, 2021 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unbind metrics that are no longer relevant
1 participant