activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Massive parallel message distribution (Thousands of clients)
Date Mon, 10 Apr 2006 17:11:18 GMT
On 4/10/06, RickBadertscher <> wrote:
> James.Strachan wrote:
> >
> > On 4/10/06, RickBadertscher <> wrote:
> >> I need to asynchronously transmit different messages to possibly
> >> thousands of
> >> clients.  I don't know enough about activemq implementation to know
> >> whether
> >> each client maintains an open socket to the provider, if so, it would
> >> seem
> >> jms point-to-point my not work for this type of problem as the provider
> >> would be overloaded with open sockets.   Does anyone have an insight on
> >> this?   I was thinking of just writing a simple multi-threaded
> >> distributor
> >> to do what I need, but it seems that this problem should already be
> >> solved.
> >> Thanks in advance.
> >
> > When you say "client" what do you mean? FWIW if its a proces (JVM) of
> > some kind then it needs to use some kind of networking (TCP /
> > multicast / UDP) to communicate with a JMS broker.
> >
> > The publish/subscribe feature of ActiveMQ can handle many thousands of
> > clients across a network of brokers; so don't worry about the number
> > of sockets; its an issue for the broker but not for the
> > producer/consumer side. On modern operating systems you can often have
> > 1000s of sockets open per JVM; on Solaris and modern linuxes this
> > number can be > 10K sockets.
> Hi James,
> a client is a JVM somewhere on a WAN (a java agent running on a device on
> the internet).   The messages being distributed are different per client, so
> pub/sub is a no go as far as I understand it, it's point to point.  I have
> to admit some ignorance here, but I get confused when you say the broker vs.
> producer/consumer,

So a JMS client connects to the broker over (say) a socket to a
broker. You can have 1 or many brokers in a network.

A single JMS connetion can have 0..many producers & consumers.  Only 1
socket is used by the JMS connection to communicate with the broker.

> I guess I'm used to the jms provider just being an
> integral part of the appserver.

A JMS client is used by any JVM connecting on your messaging fabric.
However where the JMS brokers run is up to you; they can be in-process
in your producer/consumers or they can be separate processes.

In cases where you have lots of LAN traffic and some WAN traffic you
can use brokers as network-concentrators to minimse similar messages
being repeatedly sent over the WAN

>  But, I think I get your point, I was
> worried that maintaining such a huge # of sockets was too heavyweight, but
> it sounds like its not.   In this scenerio, would you recommend using
> ActiveMQ as a standalone process, or would it work just as well embedded in
> a jboss process. ?

Whether it should be embedded or separate depends on various things
like how many JVMS do you need, what is the network topology of the
JMS network and what message persistence strategy do you need.

But a real quick answer; I'd start your experiments with a single
remote JMS broker; its the easiest way to get started - that should be
able to handle 1000s of clients.



View raw message