Quantcast
Viewing all articles
Browse latest Browse all 5648

xmpp uri in camel / naming a hid resource

Hello,
I doubt that I understood how to name a jid-resource when using Apache Camel. Perhaps it is not even possible because the xmpp endpoint will take what I intent to be a resource as an participant.
format for an xmpp url in camel: xmpp://[login@]hostname[:port][/participant][?Options]
format of a jid: node [ at ] domain/resource
Background:
I want to use xmpp in order to access a central application (which is behind a firewall I have no influence on) from various clients. The xmpp server will be the coordinator for all the clients which send commands to the central applicatoin which in turn will answer. I will create one openfire user per installation (an installation is the combination of 1 central application and n clients accessing it).
The idea is then to have the clients logged into the xmpp server and have a jabber ressource set accordingly to differentiate between them. I want to create only one account per installation.
In a picture the communication will look like this:
 
                        +-------------------------------------+       
                        |           application:              |
                        |   installation1 [ at ] xmpp.srv.net/app    |
                        +-------------------------------------+       
                                         I
                                         I
                                         I
                        +-------------------------------------+       
                        |           XMPP Server               |
                        |    hostname: xmpp.srv.net
                        +-------------------------------------+                               
                                /                 \
                               /                   \
                              /                     \
+--------------------------------------    +--------------------------------------                
|   contacting device #1              |    |   contacting device #n              |
| installation [ at ] xmpp.srv.net/device1   |    | installation [ at ] xmpp.srv.net/devicen   |
+--------------------------------------    +--------------------------------------

Question:
How should I address the application from device1 and make sure that an outgoing answer to the request only reaches that device and no other device ?
I would have expected something like this, but this is where the interpretation of the "/" comes into my way:
from device to application:
xmpp://installation1 [ at ] xmpp.srv.net/device1/installation1 [ at ] xmpp.srv.net/app?password=kept&message=whatIsTwoTimesFour
from application to device:
xmpp://installation1 [ at ] xmpp.srv.net/app/installation1 [ at ] xmpp.srv.net/device1?passwort=secret&message=8
Any other comments concerning what I plan to do are welcome because the idea is quite new and I don't know if this is the ideal way !
But please don't comment on my drawing skills in ASCII art ;-)

Viewing all articles
Browse latest Browse all 5648

Trending Articles