Comments (9)
from stomp.
To add to this thread, would appreciate if we can have an example of how multiple subscribers should be registered on a topic. Do we need to create separate STOMP client for each subscriber for the same topic or would just a subscription suffice ?
from stomp.
Hi -
First: this is really a question for the AMQ developers. STOMP clients have nothing to do with how (or even if) durability is implemented.
Second - I can recreate what you are seeing. But ...... it is a race condition I think. At the end of your code (above) do a
sleep 10
And when the program exits, then look at the AMQ admin screens. With a suitable sleep, I get all messages received by all consumers.
As far as I can tell, all of this is working as designed.
Note that AMQ creates a durable sub. client if you do not specify one on CONNECT. You can see this in the admin screens.
from stomp.
Hi,
Thanks a lot for your response and appreciate it much.
FYI : sleep would not work in a production environment and hence looking for alternate solutions.
Few Qs :
- Could you throw some light on whether these are two separate threads that are reading from their individual sockets ?
- When we have 2 subscribers on a topic, do we need to create separate Stomp::Client connections OR create one Stomp:Client and subscriber the second Subscriber on the Client ? Would appreciate if you can share a sample code ?
from stomp.
Thanks Paul. Yes we are using ActiveMQ. Thanks a lot for calling out the pre-fetch size.
from stomp.
from stomp.
Paul, havent tested the change yet. Made the change to our larger codebase and is in the build pipeline. Havent run the above code either. Will confirm once we test the above unit test or have an opportunity to run the prod codebase.
from stomp.
We tried passing activemq.prefetchSize
as the header value while subscribing to the topic and found that after adding the value we are able to receive correct number of messages from both client.
Thanks for helping us out here @PaulGale
from stomp.
Thanks much Paul. Great suggestion.
Regarding making this the default:
I would entertain a modification where the clients asks for this to be the default. Say yet another option in the Connect hash.
I do not want it across the board. There is no sense spamming Rabbit MQ (e.g.) with AMQ specific headers.
@sudeeptarlekar - With no objections I will close this issue in the next few days.
from stomp.
Related Issues (20)
- Unexpected ACK received for message-id HOT 7
- multihost failover not really working HOT 1
- netio.rb:47:in `block (2 levels) in _receive': Connected, header read is nil, is this really a Stomp Server? (Stomp::Error::StompServerError) HOT 4
- Nasty-looking exception under jRuby HOT 3
- 1.4.5 gives me a ServerFrameNameError HOT 6
- OpenSSL Deprecations HOT 2
- New Release request HOT 3
- Code for ENV keys not in release HOT 3
- Support Stomp+SSL Url Strings in non-failover case. HOT 4
- Header decode shortcoming HOT 1
- stdout polluted with stack trace HOT 1
- Amazon ActiveMQ drops connection for long running listeners HOT 3
- rspec3 - doubles or partial doubles from rspec-mocks outside .... HOT 6
- Warning: constant ::Fixnum is deprecated HOT 1
- Provide tagged 1.4.9 release HOT 1
- Is there any method to check if subscription is present? HOT 1
- Man pages Debian.
- URL options not supported when passing URL to client
- What range of ruby versions are supported?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stomp.