java - What is the maximum number of topics an ActiveMQ broker is able to handle? -


i have following generic problem: given n sources of information, m possible types of info each source, efficient way handle topics hierarchy in activemq? typically n can 100s 10000s, while m should 10.

option 1

have hierarchy like

  • source1.*
  • source2.*
  • ...

and smart consumer (on application side) drops types of info not required.

option 2

have hierarchy like

  • source1.type1
  • source1.type2
  • source1.type3
  • ...
  • source2.type1
  • source2.type2
  • source2.type3
  • ...

with dumb consumer accepts every message.

=================================

option1 allows more sources, more work on consumer side (and more traffic on network), while option2 should more efficient on network traffic (and performances) heavier on broker resource consumption.

what's best option?

thank much

cghersi

there nothing wrong multiple sources publishing same topic. it's idea keep topics , queues down manageable levels.

i go topic type1, type2, .., type10

you can attach metadata published messages additional information using string properties. way consumers can subscribe data want using jms selector might include things such data source, info type, date, priority, or not.

messageconsumer consumer = session.createconsumer(topic, "source = 'eu-market'"); 

if there 10 times 1000 of topics, each client have open listeners multiple topics information. typically, listener requires threads requires portion of stack allocation. better let clients decide selector.

this not answer question of what's maximum limit of topics. topics , queues adds overhead broker. registered jmx mbeans , shown in web console gui. might allocate internal threads , memory resources. figure out if number of topics works or not - better test setup intended run it. milage may vary


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -