-
Notifications
You must be signed in to change notification settings - Fork 80
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
Added method to check subscribers #171
Added method to check subscribers #171
Conversation
Still working on specs |
@gmallard can I get a review? |
@gmallard any update on this? |
Running this: https://gist.github.com/gmallard/be13b2ea80150c897768e22633fd2e39 gets me:
Why ? Also: this method needs to be available to users of Stomp#Connection, not just Clients. |
01da78d
to
6879721
Compare
@gmallard I have added method to check subscriber for Stomp#Connection as well, please have a look. In example that you shared while subscribing to queue, client is using header with
Let me know if I am missing or doing something wrong here. PS: Changed method name to |
@gmallard did you got chance to look at this? |
I thought I replied to this before ..... but I cannot find that. Let me
look around, and I will get back to you.
…On 10/28/20 5:20 AM, Sudeep Tarlekar wrote:
@gmallard <https://github.com/gmallard> did you got chance to look at
this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#171 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABXPZJAZN6T7QGGM4OFFDSM7O5XANCNFSM4RTW2V5A>.
|
Well I totally lost a previous comment. Here it is again. Let's try a different approach to getting this done. What I want from this modification: For Stomp::Client: From clie1.rb - d = "/queue/abc"
client.subscribe(d, {}) {|msg|
p [ "msg", msg ]
}
#
puts "subscribed? results for clie1: #{client.protocol()} #{client.subscribed?(d)}" Wanted Results: From clie2.rb - d = "/queue/abc2"
sid = "my-sub-id"
client.subscribe(d, {:id => sid}) {|msg|
p [ "msg", msg ]
}
#
puts "subscribed? results for clie2: #{client.protocol()} #{client.subscribed?(sid)}" Wanted Results: ===================================================================== For Stomp::Connection: From conn1.rb - d = "/queue/conn1"
conn.subscribe(d, {})
puts "results:"
puts conn.subscribed?(d) Wanted Results: From conn2.rb - d = "/queue/conn2"
sid = "asub-id"
conn.subscribe(d, {:id => sid})
puts "subscribed? results for conn2: #{conn.protocol()} #{conn.subscribed?(sid)}" Wanted Results:
Wanted Results: ================================================================================ What I am currently getting with your PR: $ ./runall.sh Client close complete Client close complete proto 1.0 Connection disconnect complete Connection disconnect complete Connection disconnect complete So .... give this all another shot please. |
For clientI am not getting what am I missing here, but implementation for
I see in
For connectionIn order to maintain the subscription reference connection has to be reliable and for protocol >= 1.1 I am getting error from this line for We should passing destination and subscriber id for new for client.rb
for connection.rb
|
Well, we are getting nowhere fast here ......... Sorry about the mangled code above. Just one parameter to to 'subscribed?' - you are correct. Regarding dest vs sid - you should have to use what you supplied on the 'subscribe'. Calls to subscribe and unsubscrbe should behave exactly as they do now. 1.1 is a bit different here. History. Lets get some code out please and let me take a look at it. |
resolves #169
Added method for checking is subscription is present or not for client