Hello guys, I was able to bundle the ActiveMQ and push it into the Apache Felix context. It was not really so hard after all. I'll prepare a video-tuto about it and share it with you near. It's not complicated.
But right now I have another issue :) Here is the scenario : 1/ I created the ActiveMQ bundle inside apache felix, I run it and it listens to the needed port. 2/ I created the producer bundle and putted all the needed connection and queue creation in the start method. 3/ I created the consumer bundle following the same strategy Once I start the producer, I can see my message sent. Once I run the consumer it's ok I can see the message received, the issue is once I stop the producer bundle and I restart it, I was waiting to get a notification from my consumer bundle but not, I do have to restart the consumer so it knows about the new message and throw it out. Do you have an idea on how could I get notified by my bundle once a new message pushed into the broker queue ? I'm thinking about the fact that I did not used the multithreading, but I'm not sure, in the activeMq tutos it creates the producers/consumers using threads. So probably that's the issue.. Do I have to register my bundle in the osgi service registry ?! Thanks all for your help and sharing about osgi! 2017-02-18 11:43 GMT+01:00 <chris.g...@kiffer.be>: > As I said I haven't tried Moquette yet because I didn't yet have the need > to run an MQTT broker in an OSGi context. However the developer > specifically mentions the *possibility* of "running inside an embedded > OSGi broker like Concierge" so it would be worth contacting him about it. > > https://projects.eclipse.org/proposals/moquette-mqtt > > If you want to run a broker on an embedded device then probably your > device is some kind of "gateway" between a local network of > sensors/actuators and some kind of "cloud", am I close? In that case I > must say "Welcome to the Fog". :-) > > In this use case you probably want your own broker to act in "bridging" > mode, and then you will find that mosquitto is not very dynamic - to > change the bridging configuration you need to stop mosquitto, update the > mosquitto.conf file and restart it, a mere "HUP" is not enough. So any > OSGi service you create to control the mosquitto lifecycle is going to be > pretty ugly. > > Whether Moquette is any better in this case remains to be seen, if the > developer's idea of OSGi is "slap on an Activator and a manifest" then > you're not much further ... how much this all matters depends on your use > case and how much dynamic behaviour you need ... > > > > oki :) i'll try thay out and will let you know how it was. > > As i said i'll need the broker as a bundle in my concierge container. > > Will update you in this next week on my findings. > > Have a great week end. > > Cheers! 😊 > > > > On 17 Feb 2017 22:18, "Achim Nierbeck" <bcanh...@googlemail.com> wrote: > > > >> must be a typo :) > >> > >> mosquitto, but that's a "standalone" mqtt broker. In general it should > >> be > >> enough, depending on your use-cases :) > >> > >> > >> https://projects.eclipse.org/projects/technology.mosquitto > >> > >> 2017-02-17 22:16 GMT+01:00 Mestiri Meher <meher.mest...@gmail.com>: > >> > >>> thanks guys for your answers. > >>> Achim are you talking about moquito or moquette ? > >>> > >>> Chris, does osgfying the moquette is sthg straight forward ? do you > >>> have > >>> a moquette or mosquitto already ogfyied as bundle ? > >>> > >>> > >>> On 17 Feb 2017 21:56, "Achim Nierbeck" <bcanh...@googlemail.com> > wrote: > >>> > >>> Hi, > >>> > >>> I second that, and I can tell mosquito works out nicely for me. > >>> If you look for a tool to investigate what data is sent to your mqtt > >>> broker, I suggest mqttfx. > >>> It's a nice tool to investigate your broker. > >>> > >>> regards, Achim > >>> > >>> 2017-02-17 20:42 GMT+01:00 <chris.g...@kiffer.be>: > >>> > >>>> If you really only need MQTT then I think you should be looking at a > >>>> dedicated MQTT broker rather than an all-singing, all-dancing message > >>>> boroker like ActiveMQ. Moquette looks promising (caveat - I haven't > >>>> tried > >>>> it. yet) > >>>> > >>>> > Hi guys, > >>>> > > >>>> > I'm looking on how deploying an MQTT broker into an osgi > >>>> environment. > >>>> > > >>>> > I'm running my osgi container in an embedded environment. > >>>> > > >>>> > I tried installing apache Karaf as it already has the ActiveMQ > >>>> broker > >>>> > integration easy, but i was not able to install it as it needs some > >>>> junit > >>>> > libraries that does not comply with the jre embedded. > >>>> > > >>>> > The other solution I'm thinking of is installing the ActiveMQ broker > >>>> > against Felix. > >>>> > > >>>> > I found in an mvn repo an osgi bundle for the activeMQ but it needs > >>>> its > >>>> > dependencies. > >>>> > > >>>> > So I tried adding them as bundles but I faced an issue right now > >>>> because > >>>> > when I start that bundle it asks for a dependency that I can't find > >>>> it. > >>>> > > >>>> > -> Unable to resolve org.apache.activemq.activemq-osgi > >>>> version=5.14.3: > >>>> > missing requirement org.osgi.service.blueprint; > >>>> version=[1.0.0,2.0.0)] > >>>> > > >>>> > Do you have an idea on how I have to proceed ? > >>>> > > >>>> > Thanks in advance :) > >>>> > Meher > >>>> > _______________________________________________ > >>>> > OSGi Developer Mail List > >>>> > osgi-dev@mail.osgi.org > >>>> > https://mail.osgi.org/mailman/listinfo/osgi-dev > >>>> > >>>> > >>>> _______________________________________________ > >>>> OSGi Developer Mail List > >>>> osgi-dev@mail.osgi.org > >>>> https://mail.osgi.org/mailman/listinfo/osgi-dev > >>>> > >>> > >>> > >>> > >>> -- > >>> > >>> Apache Member > >>> Apache Karaf <http://karaf.apache.org/> Committer & PMC > >>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> > Committer > >>> & Project Lead > >>> blog <http://notizblog.nierbeck.de/> > >>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > >>> > >>> Software Architect / Project Manager / Scrum Master > >>> > >>> > >>> _______________________________________________ > >>> OSGi Developer Mail List > >>> osgi-dev@mail.osgi.org > >>> https://mail.osgi.org/mailman/listinfo/osgi-dev > >>> > >>> > >>> > >>> _______________________________________________ > >>> OSGi Developer Mail List > >>> osgi-dev@mail.osgi.org > >>> https://mail.osgi.org/mailman/listinfo/osgi-dev > >>> > >> > >> > >> > >> -- > >> > >> Apache Member > >> Apache Karaf <http://karaf.apache.org/> Committer & PMC > >> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer > >> & > >> Project Lead > >> blog <http://notizblog.nierbeck.de/> > >> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > >> > >> Software Architect / Project Manager / Scrum Master > >> > >> > >> _______________________________________________ > >> OSGi Developer Mail List > >> osgi-dev@mail.osgi.org > >> https://mail.osgi.org/mailman/listinfo/osgi-dev > >> > > _______________________________________________ > > OSGi Developer Mail List > > osgi-dev@mail.osgi.org > > https://mail.osgi.org/mailman/listinfo/osgi-dev > > > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev >
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev