Created
January 5, 2018 20:46
-
-
Save daniel-bytes/6515fbfeca12d70e9ccb864c829c0252 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def publish_event(event, prefix: '') | |
routing_key = build_routing_key(event, prefix) | |
payload = build_event_payload(event) | |
channel_pool.with do |channel| | |
channel. | |
topic(eventbus_exchange, durable: true). | |
publish(payload, routing_key: routing_key) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment