You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by somnus <77...@qq.com> on 2016/07/18 06:12:02 UTC

To be IOT mqtt middleware server

I want to use activemq to be an IOT message transport server which using mqtt
protocol.

Is it possible?

there must be many connections (stand-alone one million or more),but per
message package is small( simple json command) and no need for
persistence(maybe code a plugin to log commands in Hbase)

so i configure like this ?

<transportConnectorname=&quot;mqtt+nio&quot;uri=&quot;mqtt+nio+ssl://m2mserver:1883?maximumConnections=1000000&amp;amp;wireFormat.maxFrameSize=102400&quot;&quot;/>

then use master-slave(in zookeeper) & broker-cluster model 

will work?






--
View this message in context: http://activemq.2283324.n4.nabble.com/To-be-IOT-mqtt-middleware-server-tp4714037.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: To be IOT mqtt middleware server

Posted by Martyn Taylor <mt...@redhat.com>.
Hi,

ActiveMQ Artemis does support MQTT and has an event driven architecture,
using resource pooling to share threads and other resources across many
connections.  This does allow you to create many connections on a single
broker, but I think 1 million might be pushing it.  That said, I've not
actually tested the max number of connections possible on a single Artemis
broker.  I imagine you'd either run out of memory or connections would
start timing out way before you hit a million.

Horizontal scaling would allow you to scale brokers to accommodate more
connections, if you've not got a great deal of data flowing through the
broker this might be a viable option.  See the Artemis docs on clusters:
https://activemq.apache.org/artemis/docs/1.3.0/clusters.html.  The
bottleneck here though becomes the broker network as broker instances need
to transfer a lot of data to keep in sync.

Scalable messaging infrastructure, in cases like IoT is tricky.  Myself and
Dejan Bosanac gave a talk at last year's ApacheCon that covered various
scaling mechanisms and talked about next gen scaling using Artemis and QPID
Dispatch router.  The slides might be of interest to you:
http://www.slideshare.net/dejanb/messaging-for-iot

Thanks
Martyn

On Mon, Jul 18, 2016 at 5:55 PM, Tim Bain <tb...@alumni.duke.edu> wrote:

> Are you proposing using ActiveMQ 5.x, or Artemis?  The former doesn't have
> the concept of clustering (horizontal scaling is done by making a network
> of brokers, but it can be very inelastic scaling depending on your use case
> and network topology), and I've never tried it but I'm skeptical that a
> single broker could handle a million concurrent consumers.  I believe
> Artemis has the concept of clustering, but I personally don't know anything
> about that feature.  Kafka is another product that many people use for
> horizontal scalability in a messaging middleware solution.
>
> Tim
>
> On Jul 18, 2016 9:26 AM, "somnus" <77...@qq.com> wrote:
>
> > I want to use activemq to be an IOT message transport server which using
> > mqtt
> > protocol.
> >
> > Is it possible?
> >
> > there must be many connections (stand-alone one million or more),but per
> > message package is small( simple json command) and no need for
> > persistence(maybe code a plugin to log commands in Hbase)
> >
> > so i configure like this ?
> >
> >
> >
> <transportConnectorname=&quot;mqtt+nio&quot;uri=&quot;mqtt+nio+ssl://m2mserver:1883?maximumConnections=1000000&amp;amp;wireFormat.maxFrameSize=102400&quot;&quot;/>
> >
> > then use master-slave(in zookeeper) & broker-cluster model
> >
> > will work?
> >
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/To-be-IOT-mqtt-middleware-server-tp4714037.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>

Re: To be IOT mqtt middleware server

Posted by somnus <77...@qq.com>.
ok,i will try this feature before i change into other middleware,because i
have experience of activemq clusting,i don't want to give up so quickly.

thx.



--
View this message in context: http://activemq.2283324.n4.nabble.com/To-be-IOT-mqtt-middleware-server-tp4714037p4714072.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: To be IOT mqtt middleware server

Posted by Tim Bain <tb...@alumni.duke.edu>.
Are you proposing using ActiveMQ 5.x, or Artemis?  The former doesn't have
the concept of clustering (horizontal scaling is done by making a network
of brokers, but it can be very inelastic scaling depending on your use case
and network topology), and I've never tried it but I'm skeptical that a
single broker could handle a million concurrent consumers.  I believe
Artemis has the concept of clustering, but I personally don't know anything
about that feature.  Kafka is another product that many people use for
horizontal scalability in a messaging middleware solution.

Tim

On Jul 18, 2016 9:26 AM, "somnus" <77...@qq.com> wrote:

> I want to use activemq to be an IOT message transport server which using
> mqtt
> protocol.
>
> Is it possible?
>
> there must be many connections (stand-alone one million or more),but per
> message package is small( simple json command) and no need for
> persistence(maybe code a plugin to log commands in Hbase)
>
> so i configure like this ?
>
>
> <transportConnectorname=&quot;mqtt+nio&quot;uri=&quot;mqtt+nio+ssl://m2mserver:1883?maximumConnections=1000000&amp;amp;wireFormat.maxFrameSize=102400&quot;&quot;/>
>
> then use master-slave(in zookeeper) & broker-cluster model
>
> will work?
>
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/To-be-IOT-mqtt-middleware-server-tp4714037.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: To be IOT mqtt middleware server

Posted by Christian Schneider <ch...@die-schneider.net>.
As far as I know each connection needs a socket. As there are only about
64k sockets I can not imagine that 1 million connection can be done on a
single system.
Apart from consumers how many messages per second do you expect?

Christian

2016-07-18 8:12 GMT+02:00 somnus <77...@qq.com>:

> I want to use activemq to be an IOT message transport server which using
> mqtt
> protocol.
>
> Is it possible?
>
> there must be many connections (stand-alone one million or more),but per
> message package is small( simple json command) and no need for
> persistence(maybe code a plugin to log commands in Hbase)
>
> so i configure like this ?
>
>
> <transportConnectorname=&quot;mqtt+nio&quot;uri=&quot;mqtt+nio+ssl://m2mserver:1883?maximumConnections=1000000&amp;amp;wireFormat.maxFrameSize=102400&quot;&quot;/>
>
> then use master-slave(in zookeeper) & broker-cluster model
>
> will work?
>
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/To-be-IOT-mqtt-middleware-server-tp4714037.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>