LibraryToggle FramesPrintFeedback
Name Description
room If this option is specified, the component will connect to MUC (Multi User Chat). Usually, the domain name for MUC is different from the login domain. For example, if you are [email protected] and want to join the krypton room, then the room URL is [email protected]. Note the conference part.
user User name (without server name). If not specified, anonymous login will be attempted.
password Password.
resource XMPP resource. The default is Camel.
createAccount If true, an attempt to create an account will be made. Default is false.
participant JID (Jabber ID) of person to receive messages. room parameter has precedence over participant.
nickname Use nickname when joining room. If room is specified and nickname is not, user will be used for the nickname.
serviceName Fuse Mediation Router 1.6/2.0 The name of the service you are connecting to. For Google Talk, this would be gmail.com.

User superman to join room krypton at jabber server with password, secret:

xmpp://[email protected]/[email protected]&password=secret

User superman to send messages to joker:

xmpp://[email protected]/[email protected]?password=secret

Routing example in Java:

from("timer://kickoff?period=10000").
setBody(constant("I will win!\n Your Superman.")).
to("xmpp://[email protected]/[email protected]?password=secret");

Consumer configuration, which writes all messages from joker into the queue, evil.talk.

from("xmpp://[email protected]/[email protected]?password=secret").
to("activemq:evil.talk");

Consumer configuration, which listens to room messages (supported from camel-1.5.0):

from("xmpp://[email protected]/?password=secret&[email protected]").
to("activemq:krypton.talk");

Room in short notation (no domain part; for camel-1.5.0+):

from("xmpp://[email protected]/?password=secret&room=krypton").
to("activemq:krypton.talk");

When connecting to the Google Chat service, you'll need to specify the serviceName as well as your credentials (as of Fuse Mediation Router 1.6/2.0):

// send a message from [email protected] to [email protected]
from("direct:start").
        to("xmpp://talk.google.com:5222/[email protected]?serviceName=gmail.com&user=fromuser&password=secret").
        to("mock:result");
Comments powered by Disqus