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

Applied performance improvements for async and worker publishers: #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oivoodoo-work
Copy link

@oivoodoo-work oivoodoo-work commented Oct 19, 2019

  • moved _publish method as class method to BarkMQ::Publisher module:
    Example: BarkMQ::Publisher.publish(topic_name, message).
    Previously it was defined in multiple places async and worker publishers.

  • improved performance of publish method by caching topic_arn instead of
    calling all the time create_topic of aws library. Now BarkMQ.publisher_config contains topic_arns as cached arn names.
    Introduced the new method BarkMQ.publisher_config.fetch_topic_arn(topic_name) to get or create topic_arn once.

  • verified that create_topic happened only once on BarkMQ::Publisher.publish and it doesn't require to make any enhancement

Spend my time for free and want to push this change as it is

@barkshass thought you will delete your pull request as regret otherwise I see my changes as it is under your name, I decided to leave fork with details. don't spam me anymore.

author: @oivoodoo

- moved _publish method as class method to BarkMQ::Publisher module:
Example: BarkMQ::Publisher.publish(topic_name, message).
Previously it was defined in multiple places async and worker publishers.

- improved performance of publish method by caching topic_arn instead of
calling all the time create_topic of aws library. Now BarkMQ.publisher_config contains topic_arns as cached arn names.
Introduced the new method BarkMQ.publisher_config.fetch_topic_arn(topic_name) to get or create topic_arn once.

- verified that create_topic happened only once on BarkMQ::Publisher.publish and it doesn't require to make any enhancement

Spend my time for free and want to push this change as it is

author: @oivoodoo
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.

2 participants