We support the Jabber network via the XMPP protocol using the Smack client for Java.

Sending messages from JBI to Jabber

Both individual based and group chat mechanisms are supported. Here's an example regular chat sender component.

<sm:activationSpec componentName="myJabberSender" service="foo:myJabberSender" endpoint="myJabberSender">
  <sm:component><bean class="org.apache.servicemix.components.jabber.JabberChatSender">
    <property name="host" value="localhost"/>
    <property name="port" value="6222"/>
    <property name="user" value="[email protected]"/>
    <property name="password" value="rocks"/>
    <property name="participant" value="[email protected]"/>
  </bean></sm:component>
</sm:activationSpec>

 

Notice how you specify a participant for the person to talk to.

For group chats you specify a room

<sm:activationSpec componentName="myJabberSender" service="foo:myJabberSender" endpoint="myJabberSender">
  <sm:component><bean class="org.apache.servicemix.components.jabber.JabberGroupChatSender">
    <property name="host" value="localhost"/>
    <property name="port" value="6222"/>
    <property name="user" value="[email protected]"/>
    <property name="password" value="rocks"/>
    <property name="room" value="servicemixroom"/>
  </bean></sm:component>
</sm:activationSpec>

 

Receiving messages from Jabber and sending them into JBI to be routed by the NMR

<sm:activationSpec componentName="myJabberReceiver" service="foo:myJabberReceiver" endpoint="myJabberReceiver" destinationService="foo:receiver">
  <sm:component><bean class="org.apache.servicemix.components.jabber.JabberReceiver">
    <property name="host" value="localhost"/>
    <property name="port" value="6222"/>
    <property name="user" value="[email protected]"/>
    <property name="password" value="rocks"/>
  </bean></sm:component>
</sm:activationSpec>