【问题标题】:ActiveMQ setup of tcp socket using mina使用 mina 设置 tcp 套接字的 ActiveMQ
【发布时间】:2010-09-20 22:40:51
【问题描述】:

我正在尝试设置一个简单的 activemq 和 mina 演示。我在 activemq.xml 文件中编辑了 camelContext 以包含两个 mina tcp 套接字、两个队列和路由:

listenerA -> qA -> listenerB
listenerB -> qB -> listenerA

目的是在两个 telnet 会话之间有两种方式通过。稍后,我将在每个侦听器上添加更多花哨的功能,例如过滤、路由到主题和我自己的编解码器。

这是我的骆驼上下文:

    <!-- You can use a <package> element for each root package to search for Java routes --> 
    <package>com.myco.codec</package> 

    <endpoint id="listener_A" uri="mina:tcp://localhost:42000?textline=true"/> 
    <endpoint id="listener_B" uri="mina:tcp://localhost:42001?textline=true"/> 

            <!-- You can use Spring XML syntax to define the routes here using the <route> element --> 
    <route> 
        <from ref="listener_A"/> 
        <to uri="activemq:qA"/> 
    </route> 
    <route> 
        <from uri="activemq:qB"/> 
        <to ref="listener_A"/> 
    </route> 
    <route> 
        <from ref="listener_B"/> 
        <to uri="activemq:qB"/> 
    </route> 
    <route> 
        <from uri="activemq:qA"/> 
        <to ref="listener_B"/> 
    </route> 
</camelContext> 

当我启动 activemq 时出现异常:

org.apache.camel.NoSuchEndpointException:找不到端点:mina:tcp://localhost:42000?textline=true

我是否明确需要添加一个 mina bean?如果是,在哪里以及如何?

【问题讨论】:

    标签: activemq apache-camel apache-mina


    【解决方案1】:

    你有camel-mina.jar 和类路径上的mina jars 吗?

    基于the thread here 似乎已修复它。

    【讨论】:

    • 罐子修复了它。 (或者更确切地说,让我遇到了另一个问题)。
    猜你喜欢
    • 1970-01-01
    • 2014-12-31
    • 1970-01-01
    • 1970-01-01
    • 2019-07-15
    • 1970-01-01
    • 1970-01-01
    • 2015-08-04
    • 1970-01-01
    相关资源
    最近更新 更多