【问题标题】:Camel Spring EMS SSL not workingCamel Spring EMS SSL 不工作
【发布时间】:2018-02-14 14:18:02
【问题描述】:

我们已经使用 Camel 通过 Spring 和 EMS 消息在不同目的地之间进行路由:

托管在 tcp/http 协议上的 EMS 队列/主题工作正常,而 SSL 导致以下异常:

Error: Error occured while reading identity data: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded: url that returned this exceptio= ssl://random.host.com:41943

对于正常的 spring tibco EMS SSL 连接,我们需要通过覆盖 ListenerContainer 来设置以下内容:

TibjmsSSL.setPassword(passwordCharArray);

骆驼配置怎么办:

<bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration">
        <property name="connectionFactory" ref="userCredentialsConnectionFactory" />
        <property name="transacted" value="false" />
        <property name="concurrentConsumers" value="1" />
        </property>
    </bean>

这是我的骆驼 jms 配置

我尝试通过设置以下属性来覆盖我自己的自定义实现,它似乎没有覆盖所需的功能:

org.apache.camel.component.jms.JmsConfiguration.messageListenerContainerFactory

【问题讨论】:

    标签: spring ssl apache-camel


    【解决方案1】:

    [固定]

    重写doCreateConnection(String,String) 导入方法org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter

    并在TibjmsSSL.setPassword(passwordCharArray)中设置所需密码

    【讨论】:

      猜你喜欢
      • 2013-05-12
      • 1970-01-01
      • 1970-01-01
      • 2018-06-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多