[Artemis] Using webservices inside mqtt interceptor

2017-09-13 Thread aragoubi
I have a mqtt interceptor inside my artemis broker. The jar of the interceptor contains a list of classes used basically for creating web services calls. I am using Retrofit library for REST webservices. My problem is that, classes containing retrofit (import retrofit) are never called or instanti

Re: wildfly-10.1.0.Final integration for MQTT not working

2017-09-13 Thread aragoubi
I got the same problem, I think it's not yet implemented. https://developer.jboss.org/message/974758#974758 -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: [Artemis] Getting client username when intercepting MqttSubscribeMessage

2017-08-29 Thread aragoubi
Yes, and with the RemotingConnection I can get only the remote adress (ip adress and port). So it is not possible to know the user when intercepting MqttSubscriveMessage? Could I add this by changing the Artemis project code ? -- View this message in context: http://activemq.2283324.n4.nabble.

[Artemis] Getting client username when intercepting MqttSubscribeMessage

2017-08-29 Thread aragoubi
I have a MQTT interceptor inside my Artemis broker. I am intercepting MqttSubscribeMessage. My purpose is to get client username and userId trying to subscribe when intercepting the MqttSubscribeMessage. Is it possible to do this ? could someone help me with this ? -- View this message in conte

[Artemis] Intercept mqtt client subscription

2017-08-25 Thread aragoubi
I added an mqtt interceptor into my artemis broker in order to intercept mqtt client subscription: public class SimpleMQTTInterceptor implements MQTTInterceptor { @Override public boolean intercept(final MqttMessage mqttMessage, RemotingConnection connection) throws ActiveMQE

Re: Intercept mqtt client connection

2017-08-17 Thread aragoubi
Finally, I succeeded, I compiled project with modification, and replaced the jar into artemis lib folder, and now the broker is able to intercept mqtt connection. Thank you for your help and suggestions. -- View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Intercept-mq

Re: Intercept mqtt client connection

2017-08-17 Thread aragoubi
I want to intercept clients when trying to connect in order to do some checks before allowing them to connect. How could I add needed features to cshanon broker interceptor? Is cshanon broker interceptor different from the interceptor of Artemis 2.1.0 ? I don't have any idea about cshanon broker i

Re: Intercept mqtt client connection

2017-08-16 Thread aragoubi
I tried to add the modification to the code. I imported all the project, then I tried to compile the artemis-mqtt-project in order to get .class files. I tried also to generate a jar file. But It doesn't work. I get a lot of error when I try to import all projects in eclipse. Do you have an idea of

Intercept mqtt client connection

2017-08-10 Thread aragoubi
I added an mqtt interceptor into my artemis broker in order to intercept mqtt client connection: /public class SimpleMQTTInterceptor implements MQTTInterceptor { @Override public boolean intercept(final MqttMessage mqttMessage, RemotingConnection connection) throws ActiveMQExcep

Artemis mqtt client interceptor: java.lang.ClassNotFoundException

2017-08-09 Thread aragoubi
I want to intercept message send by a mqtt client to artemis broker. I am following the example "interceptor-client-mqtt". My problem is that I am always getting an error "java.lang.ClassNotFoundException: SimpleMQTTInterceptor". My question is where should I put the interceptor class so that the b

Re: Connecting jetty websocket client to artemis stomp over websocket connector

2017-08-08 Thread aragoubi
I found an example which help me with this https://github.com/inventit/mqtt-websocket-java . Now, I am trying to manage queue using jmx, but unfortunately, even that I am following the code of jmx example, It doesn't work. I will post another que

Connecting jetty websocket client to artemis stomp over websocket connector

2017-08-07 Thread aragoubi
I am trying to connect a websocket client to artemis stomp over websocket acceptor. I am following this example https://www.eclipse.org/jetty/documentation/9.4.x/jetty-websocket-client-api.html . When client try

Artemis activemq with jconsole doesn't show topics management

2017-08-03 Thread aragoubi
I have a standalone artemis activemq broker. I start the broker, and I open jconsole in order to see and manage activemq, but I am not seeing topic, I can see only queues. Before, I was using activemq, and I was able to see topics through jconsole. jconsole.png

Re: User: null does not have permission='CREATE_DURABLE_QUEUE' on address $sys.mqtt.queue.qos2.JavaSample

2017-08-01 Thread aragoubi
could you tell me how I could change from version seeing that I am using the native artemis of wildfly-10.1.0.Final ? -- View this message in context: http://activemq.2283324.n4.nabble.com/User-null-does-not-have-permission-CREATE-DURABLE-QUEUE-on-address-sys-mqtt-queue-qos2-JavaSample-tp472912

User: null does not have permission='CREATE_DURABLE_QUEUE' on address $sys.mqtt.queue.qos2.JavaSample

2017-08-01 Thread aragoubi
I am trying to connect a simple paho client to artemis wildfly broker. I am getting this when I try to connect my client: WARN [org.apache.activemq.artemis.core.protocol.mqtt] (Thread-2 (activemq-netty-threads-164875171)) Error processing Control Packet, Disconnecting ClientAMQ119032: User: null do

Re: Exception when connecting simple client to artemis wildfly broker

2017-07-31 Thread aragoubi
I posted a question in wildfly forum https://developer.jboss.org/message/974758#974758 . -- View this message in context: http://activemq.2283324.n4.nabble.com/Exception-when-connecting-simple-client-to-artemis-wildfly-broker-tp4729069p47290

Exception when connecting simple client to artemis wildfly broker

2017-07-31 Thread aragoubi
I am using apache paho to connect a client to artemis wildfly embeded broker. I added mqtt protocol module. The client connect to the broker via ""tcp://localhost:61616" port. This is the full stacktrace of the exception stacktrace.txt

Re: Add mqtt protocol to artemis Wildfly

2017-07-31 Thread aragoubi
Thank you for your response, yes now it works fine, it was a jars problem. I begin with artemis, and I would like to know how could I configure my broker, for example if I want to add an interceptor in order to intercept connections to broker. Do you have any idea on how to achieve that ? -- Vie

Add mqtt protocol to artemis Wildfly

2017-07-31 Thread aragoubi
I want to use mqtt with Artemis activemq. I tried adding a module for mqtt exactely like in this post https://stackoverflow.com/questions/39427558/how-to-work-with-mqtt-in-wildfly. My problem is the same, I can't see the *Adding protocol support for: MQTT* when I start wildfly. I am starting wildfl

Re: Adding activemq jetty-all jar for using ws doesn't allow me anymore getting jboss exposed ejb

2017-06-20 Thread aragoubi
Unfortunaltely, this doesn't solve my problem. Now, Now when I try to get EJB I am getting this*: Stopping MQTTSocket_890308146 because Failed with SecurityException: EJB client context selector may not be changed*. I think that this is related to the fact that I am connecting to jboss server from

Re: Adding activemq jetty-all jar for using ws doesn't allow me anymore getting jboss exposed ejb

2017-06-11 Thread aragoubi
I didn't get response from jboss forum. Actually, I tried differents ways, and I finally get it working only if I remove the jetty-all jar(remove ws connector). Without jetty, it is looking for my jndi in the right place. I am defining the jndi properties like this : Properties jndiProps = n

Re: Adding activemq jetty-all jar for using ws doesn't allow me anymore getting jboss exposed ejb

2017-06-09 Thread aragoubi
This is the topic in stackoverflow https://stackoverflow.com/questions/44392545/get-ejb-object-inside-rar-deployed-inside-jboss/44393205?noredirect=1#comment75871624_44393205

Adding activemq jetty-all jar for using ws doesn't allow me anymore getting jboss exposed ejb

2017-06-08 Thread aragoubi
I have an activemq broker deployed within my jboss server. activemq is deployed as a rar file placed into jboss standalone/deployment repository. An other project is also deployed within my jboss as an ear file. This last is exposing some ejb objects. I tried to get an ejb inside a jar file p

Re: Getting jboss ejb in ativemq rar deployed within jboss

2017-06-04 Thread aragoubi
I post my question in activemq forum because I have a doupt that activemq is always looking for JNDI beans within jetty server. I asked also in jboss forum but unfortunately I didn't get any response. -- View this message in context: http://activemq.2283324.n4.nabble.com/Getting-jboss-ejb-in-at

Re: Getting jboss ejb in ativemq rar deployed within jboss

2017-06-02 Thread aragoubi
Hi Tim, TokenAuthentificationBroker is a class used to intercept the client connection to get the username(The token for me). It's the same thing as MyBroker class here http://activemq.apache.org/interceptors.html . Within the addConnection function

Getting jboss ejb in ativemq rar deployed within jboss

2017-06-02 Thread aragoubi
I have an activemq broker deployed within my jboss server. activemq is deployed as a rar file placed in jboss standalone/deployment repository. An other project is also deployed within my jboss as an ear file. This last is exposing some ejb objects in my jboss. I tried to get an ejb from a jar fi

Re: load class from activeMQ broker config

2017-05-30 Thread aragoubi
No I'm not dynamically adding meta-data to messages which the user sends. The system stores users and generates tokens for them after connection. tokens are expired within a period of time. So my broker receive token, and then send it back to the system for security matters and to identify users(ge

Re: load class from activeMQ broker config

2017-05-30 Thread aragoubi
How can I change my packaging/deployment? Could you tell me more ? For the "token" use-case, I should receive token from client who try to connect to my broker, then send it to a system in order to verify client and to get further informations about him. -- View this message in context: http

Re: load class from activeMQ broker config

2017-05-30 Thread aragoubi
1) When I start my jboss, I see that the war is deployed before activeMQ. 2) I need this plugin because I need to implement a code that send token to a remote system to verify token passed by client. To summerize my purpose is to call a class included in a war from the activemq rar. I also posted

load class from activeMQ broker config

2017-05-30 Thread aragoubi
I have an activemq broker deployed inside my jboss server. I am following this link in order to limit the connectivity to the ActiveMQ server based on Token *https://mariuszprzydatek.com/2014/01/04/token-based-authentication-plugin-for-activemq/*. I created a project named "authentification" in e

Re: Connection to activemq broker is lost within one second

2017-05-23 Thread aragoubi
Also I am connecting the client to the "ws://0.0.0.0:1883" port instead of the "ws://0.0.0.0:61615" port. But even like this, with activemq 5.14.3 I still have the same problem "client disconnecting in one second". -- View this message in context: http://activemq.2283324.n4.nabble.com/Connectio

Re: Connection to activemq broker is lost within one second

2017-05-23 Thread aragoubi
Now it's working for me too Tim, I think it was a problem of activeMQ and apache paho version compatibility. Maybe this is why threads were being killed for me. Now I am using activeMQ 5.9.0 and apache paho 1.1.0 and it is working fine. -- View this message in context: http://activemq.2283324.n

Re: Could not accept connection from tcp://192.168.0.116:60999 : org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed: tcp://192.168.0.116:60999

2017-05-18 Thread aragoubi
Thank you Tim for your response. When I an mqtt transport connector to my broker-config " " and I try to connect to it using apache paho java, I am getting this exception : Exception in thread "main" java.lang.IllegalArgumentException: mqtt://0.0.0.0:1884 at org.eclipse.paho.clie

Could not accept connection from tcp://192.168.0.116:60999 : org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed: tcp://192.168.0.116:60999

2017-05-18 Thread aragoubi
I have an embedded broker, and I am connection a Paho client to it. This my broker config file : http://activemq.apache.org/schema/core"; useJmx="true" useShutdownHook="false" brokerName="mimo.broker1"> I am getting t

Re: Connection to activemq broker is lost within one second

2017-05-17 Thread aragoubi
This at the end of code, I am getting the problem just when I connect (IMqttToken token = sampleClient.connect(connOpts);). When I debug, I stop just after the connection line, and first the connectComplete(boolean reconnect, String serverURI) method of the callback is invoked and just after a seco

Re: Connection to activemq broker is lost within one second

2017-05-17 Thread aragoubi
No, I am not closing connection, this is the client code and the broker files(ra.xml, ironjacamar.xml, broker-config.xml): client.txt broker-config.xml iron

Re: Connection to activemq broker is lost within one second

2017-05-17 Thread aragoubi
I upgraded to activemq 5.14.3, and I changed log level to debug. Client still loosing connection just 1 second after connection. Here is my server.log file : server.log -- View this message in context: http://activemq.2283324.n

Re: Connection to activemq broker is lost within one second

2017-05-16 Thread aragoubi
I am using activemq 5.9.0. My client is using mqtt v3.1. I can't enable more log for my broker because I can't access my broker with jconsole in order to change th log4j. There is no problem with my client because connection is established. He just told that connection is lost (callbacks). I think

Connection to activemq broker is lost within one second

2017-05-16 Thread aragoubi
I have an embedded broker, and I am connection a Paho client to it. This my broker config file : http://activemq.apache.org/schema/core"; useJmx="true" useShutdownHook="false" brokerName="mimo.broker1">

Re: WARN [org.apache.activemq.broker.TransportConnection.Transport] (qtp906254668-147) Transport Connection to: MQTTSocket_248153872 failed: java.io.IOException: Invalid CONNECT encoding

2017-05-12 Thread aragoubi
Finally I attached a debugger to the broker, know I am getting a little bit more information about the problem. Here is what I am getting as WARN : 11:19:16,308 WARN [org.apache.activemq.transport.mqtt.MQTTProtocolConverter] (ActiveMQ Transport: tcp:///192.168.0.116:59362@1884) Exception occurre

Re: WARN [org.apache.activemq.broker.TransportConnection.Transport] (qtp906254668-147) Transport Connection to: MQTTSocket_248153872 failed: java.io.IOException: Invalid CONNECT encoding

2017-05-12 Thread aragoubi
Ok understood. I have a A doubt that the warn is comming from the fact that I am connecting a MQTT client over websocket. I don't know if activeMQ allows mqtt+ws. I tried to connect to the port "ws://0.0.0.0:1884" from a mqtt client(apache paho java). Do you have an idea how to enable mqtt over we

WARN [org.apache.activemq.broker.TransportConnection.Transport] (qtp906254668-147) Transport Connection to: MQTTSocket_248153872 failed: java.io.IOException: Invalid CONNECT encoding

2017-05-11 Thread aragoubi
I have an embedded activeMQ broker listening to two ports. Here's my broker-config file : http://www.springframework.org/schema/beans"; xmlns:amq="http://activemq.apache.org/schema/core"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.springframewo

Can't connect to broker from paho mqtt client

2017-05-11 Thread aragoubi
Hi, I have an embedded activeMQ broker listening to two ports. Here's my broker-config file : http://www.springframework.org/schema/beans"; xmlns:amq="http://activemq.apache.org/schema/core"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.springframe

[org.apache.activemq.broker.TransportConnection.Transport] (qtp749972657-157) Transport Connection to: MQTTSocket_2052272783 failed: java.io.IOException: Invalid CONNECT encoding

2017-05-10 Thread aragoubi
I integrated activeMQ broker into my jboss in such a way that the broker is launched when jboss launch. This is transport connectors defined in my broker's config file: I tried a mqtt client using java paho mqttv3, this is how I tried to connect to my broker:

Could not find factory class for resource: META-INF/services/org/apache/activemq/transport/ws

2017-05-04 Thread aragoubi
I Integrated activeMQ in jboss in such a way that when I start a project deployed in jboss, activeMQ broker start. I followed a tutorial to integrate activeMQ in jboss. I copied the activemq-rar-5.9.0.rar into the standalone/deployments folder, then I generated the ironjacamar.xml file which I pu

Re: Transport Connector could not be registered in JMX: Transport scheme NOT recognized: [ws]

2017-05-04 Thread aragoubi
I followed a tutorial to integrate activeMQ in jboss. I copied the activemq-rar-5.9.0.rar into the standalone/deployments folder, then I generated the ironjacamar.xml file which I put into the meta-inf folder. The activemq-rar-5.9.0.rar contains a list of jar files. I don't know if should add jars

Transport Connector could not be registered in JMX: Transport scheme NOT recognized: [ws]

2017-05-03 Thread aragoubi
I Integrated activeMQ in jboss in such a way that when I start a project deployed in jboss, activeMQ broker start. The broker serverUrl defined in the ra.xml file is "vm://localhost" and my broker-config file: http://www.springframework.org/schema/beans"; xmlns:amq="http://activemq.apache.org/s

Integrate activeMQ module within JbossAS7.0.1

2017-04-25 Thread aragoubi
Hello, II am following this tutorial in order to add ActiveMQ module within jbossAS7.0.1.Final https://developer.jboss.org/wiki/HowToUseOutOfProcessActiveMQWithWildFly . This tutorial is dedicated to Jboss WildFly but it

Re: deploying activeMQ with JBOSS AS7.1.0.Final

2017-04-24 Thread aragoubi
Do you know how could I fix this problem ? I am obliged to use this version of jboss. I thank you for your response. -- View this message in context: http://activemq.2283324.n4.nabble.com/deploying-activeMQ-with-JBOSS-AS7-1-0-Final-tp4725192p4725194.html Sent from the ActiveMQ - User mailing l

deploying activeMQ with JBOSS AS7.1.0.Final

2017-04-24 Thread aragoubi
Hello, I am following this tutorial in order to deploy Activemq within jboss http://activemq.apache.org/jboss-integration.html . I reached the "Configuring JBoss" section, but when I add the activemq-jms-ds.xml file, the deployment doesn't wor

Interest of using activeMQ resource adapter

2017-04-18 Thread aragoubi
I am creating a Java application in eclipse to let different devices communicate together using a publish/subscribe protocol. I am using Jboss and ActiveMQ and I want to know if I should use an ActiveMQ resource adapter to integrate the broker in jboss in a standalone mode or I should just add dep