Open aycanvargun opened 6 years ago
The kapua gateway client allows you to receive messages like in the exampe: https://github.com/ctron/kapua-gateway-client/blob/master/gateway-client-profile-kura/src/test/java/org/eclipse/kapua/gateway/client/KuraExample.java#L45
I subscribed to a topic ("receiver") and wait for the connection, I get error from broker container logs,
07:33:09.392 [ActiveMQ NIO Worker 4] WARN o.a.a.t.m.s.AbstractMQTTSubscriptionStrategy - Error subscribing to acme123/soap9/app1/my/receiver java.lang.SecurityException: User user123 (soap9 - tcp://217.78.106.69:56486 - conn id 600724459434597600) is not authorized to read from: Consumer.8,539,744,234,403,289,497:soap9:AT_LEAST_ONCE.VirtualTopic.acme123.soap9.app1.my.receiver
I subscribed to the topic ("sender") that I created, I get error from broker container logs,
[Camel (camelContext) thread #17 - JmsConsumer[Consumer.eurotech:mainRoutelisteners:EXACTLY_ONCE.VirtualTopic.%3E]] WARN eclipselink.logging.all - Exception [EclipseLink-5006] (Eclipse Persistence Services - 2.6.3.v20160428-59c81c5): org.eclipse.persistence.exceptions.OptimisticLockException
Exception Description: The object [org.eclipse.kapua.service.device.registry.internal.DeviceImpl@7e72d798[tagIds={[]},groupId=null>,clientId=soap9,connectionId=600724459434597600,connection=org.eclipse.kapua.service.device.registry.connection.internal.DeviceConnectionImpl@a1061e2,status=ENABLED,displayName=<null,lastEventId=4757100873288453679,lastEvent=org.eclipse.kapua.service.device.registry.event.internal.DeviceEventImpl@4db71c89,serialNumber=
Both problems look like an issue in Kapua, and less like an issue in the gateway client to me.
Maybe you can ask a question about that on the kapua-dev mailing list, or on the eclipse/kapua project on GitHub.
Ok, I will as. Thank you.
Kind Regards.
Hi again,
I can send data to my Kapua from the FuseClient now.
(1) But I want to get commands from Kapua to my Fuse Client (named soap8). I don't know how. (2) In Kapua, I created a job (named job1). I added a step (named step1) (3) Inside, i added a command as 'echo "123"'. I want to get this command to my Fuse Client (named soap8) from my Kapua.
I subscribed to "my receiver" topic in Java code. But, Is there any special topic for commands? In the java code, i don't now how to get the command from Kapua. Could you please help me? In addition, In the constructor of FuseClient.java,
this.connection = connection; connection.listener(this.listener); connection.connect(new Promise<>());
Do i need this.listener in this.connection ? Do i have to change the code?
Thank you.