XMPP Protocol Support (Jabber!)

XMPP协议支持(Jabber !)

Deprecated

弃用

This transport was deprecated in 5.8.0 and has been removed in a 5.9.0!

该传输在5.8.0中被弃用,并在5.9.0中被删除!

We have support for XMPP (Jabber) as a transport in ActiveMQ.

我们支持XMPP (Jabber)作为ActiveMQ中的传输。

To use just add a connector as follows

要使用,只需添加以下连接器。

<broker xmlns="http://activemq.org/config/1.0">
    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
       <transportConnector name="stomp"    uri="stomp://localhost:61613"/>
       <transportConnector name="xmpp"     uri="xmpp://localhost:61222"/>
    </transportConnectors>
  </broker>

And you can now use XMPP to connect to the broker & send and receive messages.

现在您可以使用XMPP连接到代理&发送和接收消息。

Some versions of the broker (5.0-5.2) does not include WoodStox library by default, which could impact ActiveMQ XMPP funcionality. You should have a library named like wstx-asl-x.x.x.jar in the lib/optional directory of your broker. If that's not the case, download it from here and put it in the classpath

该代理的一些版本(5.0-5.2)不包括默认的WoodStox库,这可能会影响ActiveMQ XMPP funcionality。应该有一个名为wstx-asl-x.x.x的库。jar在您的代理的lib/可选目录中。如果不是这样,从这里下载并放到类路径中。

XMPP Support in Apache ActiveMQ

XMPP支持Apache ActiveMQ。

ActiveMQ provides a bidirectional bridge between ActiveMQ messages and XMPP.

ActiveMQ提供了ActiveMQ消息和XMPP之间的双向桥梁。

  • if a client joins a chatroom / conference room, the name of the conference room is mapped to a JMS topic of the same name
  • 如果客户端加入聊天室/会议室,则将会议室的名称映射到相同名称的JMS主题。
  • typing into a chatroom sends a message to the topic
  • 在聊天室中输入信息就可以发送信息给主题。
  • presence in a chatroom maintains a subscription on the JMS topic (using noLocal to avoid getting copies of things you say) so that messages sent by other clients (via XMPP, the Web Console, the Examples or any other Cross Language Clients) are then sent to the chatroom.
  • 在聊天室中存在的存在维护了JMS主题的订阅(使用noLocal来避免复制您说的内容),以便其他客户端发送的消息(通过XMPP、Web控制台、示例或任何其他跨语言客户端)被发送到聊天室。

Using a Jabber Client

使用Jabber客户机

Basically, you should be able to connect from any Jabber-compatible client to the broker. The below example is using Spark 2.0.0 version. For more details on connecting with different clients take a look at #Jabber clients compatibility.

基本上,您应该能够从任何与jabber兼容的客户机连接到代理。下面的示例使用Spark 2.0.0版本。有关连接不同客户端的详细信息,请参阅#Jabber客户机兼容性。

To connect to Apache ActiveMQ try the following...

要连接到Apache ActiveMQ,请尝试以下步骤…

1. Run the Web Console
2. Start Spark or whatever Jabber Client you wish
3. Login to localhost:61222

1。运行Web控制台2。启动Spark或任何Jabber客户端您希望3。登录到localhost:61222

Some Jabber clients (like iChat) insist on usernames in forms of username@host, so in that case just append @localhost to your username

一些Jabber客户机(如iChat)使用username@host的形式坚持用户名,所以在这种情况下,只需将@localhost附加到您的用户名。

Some Jabber clients like to auto-discover the host and port. You need to explicitly disable this feature so you can explicitly configure localhost as the host and 61222 as the port.

一些Jabber客户喜欢自动发现主机和端口。您需要显式地禁用此功能,这样您就可以显式地配置localhost作为主机,而61222作为端口。

e.g. on Spark go to the Advanced tab and disable the Automatically discover host and port

在Spark上,进入高级选项卡并禁用自动发现主机和端口。

4. You should now see the following screen...

4所示。现在您应该可以看到下面的屏幕…

5. Now click on the Join Conference Room button (next to the Add Contact button) and the following dialog should appear

5。现在单击Join会议室按钮(在Add Contact按钮旁边),然后出现下面的对话框。

6. Now press the Create or Join Room button to get the following dialog. Enter a JMS topic name, in this case foo.bar and you're good to go...

6。现在按下Create或Join Room按钮来获得下面的对话框。输入一个JMS主题名称,在本例中为foo。酒吧,你可以去……

7. Now your chat window should appear for talking and listening to the topic foo.bar. So start typing to test things out. 

7所示。现在,您的聊天窗口应该出现在对话框中,并收听主题foo.bar。所以开始打字来测试。

 8. Now if you go to the Topic Console in the Web Console you should see the topic has been created

8。现在,如果您到Web控制台的主题控制台,您应该会看到已经创建了主题。

 

 

9. If you now click on the Send To link next to the foo.bar topic you can send a message to the topic from the web console. 

9。如果现在单击Send To链接到foo。您可以从web控制台向主题发送消息。

 

 

10. Press send and you should see the chat appear on the chat window (smile)

10。按下发送,你就会看到聊天窗口上出现了聊天。

 

 

Jabber clients compatibility

Jabber客户兼容性

Here you can find specfic issues and workarounds for various Jabber clients. If you have some of your own, please post them here.

在这里,您可以为各种Jabber客户找到特定的问题和解决方案。如果你有自己的,请把它们贴在这里。

Spark

火花

Url: http://www.igniterealtime.org/projects/spark/index.jsp
Spark 2.0.0 works fine with ActiveMQ; Click here to download: Spark 2.0.0 for Windows.
Spark 2.5.x connects fine, but it won't open the Join Conference Room dialog.

Url: http://www.igniterealtime.org/projects/spark/index.jsp Spark 2.0.0适用于ActiveMQ;请点击此处下载:Windows的Spark 2.0.0。2.5火花。x连接好,但它不会打开连接会议室的对话框。

iChat

iChat

Url: http://www.apple.com/macosx/features/ichat.html
Tested version 4.0.7 works fine, but it insists you use username@host format for usernames

Url: http://www.apple.com/macosx/features/ichat.html测试版本4.0.7可以正常运行,但它坚持使用username@host格式来命名用户名。

Adium

Adium

Url: http://www.adiumx.com/
Tested version 1.3.3 works fine. The only spotted issue is reconnecting to Command Agent topic. We recommend that you restart the Adium if you need to do this

网址:http://www.adiumx.com/测试版1.3.3运行良好。唯一发现的问题是重新连接到命令代理主题。我们建议,如果你需要这样做,你可以重新启动。

© 2004-2011 The Apache Software Foundation.
Apache ActiveMQ, ActiveMQ, Apache, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram