From cedb1a6982a5491e604e3c986947295a12f96c04 Mon Sep 17 00:00:00 2001 From: Craig Savolainen Date: Mon, 22 Aug 2016 16:23:11 -0400 Subject: [PATCH 1/2] Consumers should create their topic Currently only publishers create the topic they push to. This creates an odd pattern as you must push before you can receive --- lib/multiple_man/runner.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/multiple_man/runner.rb b/lib/multiple_man/runner.rb index 67cb7fc..c1da680 100644 --- a/lib/multiple_man/runner.rb +++ b/lib/multiple_man/runner.rb @@ -48,7 +48,7 @@ def build_listener listener_class.new( queue: channel.queue(*queue_params), subscribers: listeners, - topic: topic_name + topic: topic ) end @@ -72,6 +72,10 @@ def channel @channel ||= Connection.connection.create_channel end + def topic + @topic ||= channel.topic(topic_name) + end + def config MultipleMan.configuration end From 3a8137c641c6703d002274ad771998bcf3c2a174 Mon Sep 17 00:00:00 2001 From: Craig Savolainen Date: Fri, 16 Sep 2016 13:28:11 -0500 Subject: [PATCH 2/2] bump so listeners create the topic if needed --- lib/multiple_man/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/multiple_man/version.rb b/lib/multiple_man/version.rb index 2386a6e..5224815 100644 --- a/lib/multiple_man/version.rb +++ b/lib/multiple_man/version.rb @@ -1,3 +1,3 @@ module MultipleMan - VERSION = "1.1.1" + VERSION = "1.1.2" end