Currently, it's not possible to call any high level operations inside the subscribe block. The program halts and it never goes on.
This is due to the fact that all the high-level methods perform the logic inside the same with_connection do. This makes sense for all the operations on the "publish channel" instantiated in client.rb:63:
conn.channel(1) # reserve channel 1 for publishes
But for the .subscribe operation a new channel is created, so I think that is OK to use another block. So in my proposed solution I create another SizedQueue used by the .subscribe method, with the corresponding with_subscribe_connection block.
Note that the underline connection is the same, I'm not creating a new connection.
closes #18
Currently, it's not possible to call any high level operations inside the subscribe block. The program halts and it never goes on.
This is due to the fact that all the high-level methods perform the logic inside the same
with_connection do
. This makes sense for all the operations on the "publish channel" instantiated inclient.rb:63
:But for the
.subscribe
operation a new channel is created, so I think that is OK to use another block. So in my proposed solution I create anotherSizedQueue
used by the.subscribe
method, with the correspondingwith_subscribe_connection
block.Note that the underline connection is the same, I'm not creating a new connection.