activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John D. Ament" <john.d.am...@gmail.com>
Subject Re: Interceptor for MQTT
Date Mon, 04 Jul 2016 22:39:51 GMT
FWIW, I raised a PR with MQTT Interceptor in it.  There's still a bit of
refactoring to do, but I think with some minor change sit would be ready to
be leveraged in every protocol.

The main problem I see is that every protocol is implemented differently.
It may be worthwhile to look at refactoring some of that code, see where
some synergy can be built.  At the end of the day, it looks like its all
just netty protocol handlers.

I do agree that being able to gather stats on various destinations in the
system would be useful though.

John

On Mon, Jul 4, 2016 at 11:58 AM Martyn Taylor <mtaylor@redhat.com> wrote:

> It depends on what you're trying to do when you get the message?    Are you
> trying to modify the message; route it else where? Browse messages? Collect
> statistics?
>
> Interceptors do allow you to interact with protocol packets but as you said
> it's not complete yet. I'll aim to get it implemented in the next release.
> Unless someone else contributes it :)  also interceptors may not be the
> best approach.  There may be alternate ways to acheive what you want.  If
> you just want to browse messages; you can use the Web console.  You may be
> able to collect stats via MBeans (also a rest API). Another way to collect
> stats might be to add a MQTT consumer and do it outside the broker.  It may
> also be possible to transform messages; you could consume from one address
> transform the message and produce to another.
>
> If you let me know what your trying to do I'll do my best to advise.
>
> Regards
> Martyn
> On 4 Jul 2016 00:28, "aries.aries" <aries123.aries123@gmail.com> wrote:
>
> > Hi Martyn,
> >
> > I want to get the messages that are published by the client on to the
> > broker. I looked into the source code and found that this can be done in
> > the "handlePublish(MqttPublishMessage message) " function in the
> > MQTTProtocolHandler.java class. Please let me know if there is a better
> way
> > as Intercepts are currently not supported.
> >
> > Thanks,
> > Vicky
> >
> > On Sat, Jul 2, 2016 at 9:07 PM, Martyn Taylor [via ActiveMQ] <
> > ml-node+s2283324n4713576h46@n4.nabble.com> wrote:
> >
> > > Hi Vicky
> > >
> > > On 2 Jul 2016 19:33, "aries.aries" <[hidden email]
> > > <http:///user/SendEmail.jtp?type=node&node=4713576&i=0>> wrote:
> > > >
> > > > Hi,
> > > >
> > > > Is there any other way to get the messages that has been published to
> > > the
> > > > MQTT broker? Please help.
> > >
> > > What do you mean by get the messages?
> > >
> > > Can you let us know what is it that you're trying to achieve?
> > > >
> > > > Thanks,
> > > > Vicky
> > > Thanks
> > > Martyn
> > > >
> > > > On Fri, Jul 1, 2016 at 1:59 AM, Justin Bertram-2 [via ActiveMQ] <
> > > > [hidden email] <http://
> > /user/SendEmail.jtp?type=node&node=4713576&i=1>>
> > > wrote:
> > > >
> > > > > It's not working because that feature is not implemented in the
> > broker
> > > as
> > > > > I stated in a previous email.  There's no way to get it working
> > unless
> > > you
> > > > > modify the broker to support it.
> > > > >
> > > > >
> > > > > Justin
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "vicky" <[hidden email]
> > > > > <http:///user/SendEmail.jtp?type=node&node=4713526&i=0>>
> > > > > To: [hidden email] <http://
> > > /user/SendEmail.jtp?type=node&node=4713526&i=1>
> > >
> > > > > Sent: Wednesday, June 29, 2016 8:39:29 AM
> > > > > Subject: Re: Interceptor for MQTT
> > > > >
> > > > > Hi,
> > > > >
> > > > > I am facing the same issue.
> > > > > The interceptor is not working for MQTT messages.
> > > > > The pub/sub is working though.
> > > > > Please help me if you were able to get it working.
> > > > >
> > > > > Thanks,
> > > > > Vicky
> > > > >
> > > > >
> > > > >
> > > > > ------------------------------
> > > > > If you reply to this email, your message will be added to the
> > > discussion
> > > > > below:
> > > > >
> > > > >
> > >
> > >
> >
> http://activemq.2283324.n4.nabble.com/Interceptor-for-MQTT-tp4713408p4713526.html
> > > > > To unsubscribe from Interceptor for MQTT, click here
> > > > > <
> > >
> > > > > .
> > > > > NAML
> > > > > <
> > >
> > >
> >
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > >
> > >
> >
> http://activemq.2283324.n4.nabble.com/Interceptor-for-MQTT-tp4713408p4713539.html
> > > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >
> > >
> > > ------------------------------
> > > If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://activemq.2283324.n4.nabble.com/Interceptor-for-MQTT-tp4713408p4713576.html
> > > To unsubscribe from Interceptor for MQTT, click here
> > > <
> >
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4713408&code=YXJpZXMxMjMuYXJpZXMxMjNAZ21haWwuY29tfDQ3MTM0MDh8MTQzNzc4NzUxNw==
> > >
> > > .
> > > NAML
> > > <
> >
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> > >
> > >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/Interceptor-for-MQTT-tp4713408p4713577.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message