You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by janssen <ja...@gmail.com> on 2016/11/15 13:51:48 UTC

Durable subscriber on an Oracle Advanced Queue (Topic)

Hello,

I am trying to connect to an Oracle Advanced Queue (multiple-consumers). We
use OSGI blueprint for bootstrapping the JMS component and setting up the
connection to the Oracle AQ server. The configuration looks as followed:


 <bean id="oracleQueue" class="org.apache.camel.component.jms.JmsComponent">
    <property name="connectionFactory" ref="oracleQueueCredentials"/>
  </bean>
  
  <bean id="oracleQueueCredentials"
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
      <property name="targetConnectionFactory"
ref="connectionFactoryOracleAQQueue"/>
      <property name="username" value="${username}"/>
      <property name="password" value="${password}"/>
   </bean>
  
  <bean id="connectionFactoryOracleAQQueue" class="oracle.jms.AQjmsFactory"
factory-method="getTopicConnectionFactory">
      <argument
value="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=HostName)(Port=Port))(CONNECT_DATA=(SID=SID)))"/>
      <argument>
        <props>
          <prop key="name" value="${username}"/>
        </props>
      </argument>
   </bean>
  
  <bean id="mqMessageListenerContainerFactory"
class="nl.schiphol.asb.generic.connectors.jmsconnectionstatuslogging.ConnectionStatusLoggingMessageListenerContainerFactory">
    <argument ref="fromSpacesAQLogger" />
    <argument value="${url}" />
    <argument value="AQ" />
  </bean>

The endpoint in my camel route:

from("oracleQueue:topic:DbUserName.TopicName?messageListenerContainerFactoryRef=#mqMessageListenerContainerFactory&clientId=subscriberName&durableSubscriptionName=subscriberName&subscriptionDurable=true")...

This all results in the following error when we try to connect to the AQ
instance. 

2016-11-15T14:36:24.954 | WARN  | LSYS.WF_JMS_OUT] |
sLoggingMessageListenerContainer | 184 -
org.apache.servicemix.bundles.spring-jms - 3.2.12.RELEASE_1 | Setup of JMS
message listener invoker failed for destination 'DbUserName.TopicName' -
trying to recover. Cause: ORA-24031: invalid value, SUBSCRIBER name or
address should be non-NULL
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 6274
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_AQJMS", line 129
ORA-06512: at line 1



  




--
View this message in context: http://camel.465427.n5.nabble.com/Durable-subscriber-on-an-Oracle-Advanced-Queue-Topic-tp5790149.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Durable subscriber on an Oracle Advanced Queue (Topic)

Posted by janssen <ja...@gmail.com>.
Found the solution to our problem.

The problem was caused by a difference in character sets. The database uses
WE8ISO8859P15 which is not directly supported. The difference can cause
issues when setting the subscriber or reading / writing jmsproperties. 
The issue was solved by adding the ojdbc and the orai18n as embedded
dependency of our bundle.

Make sure you add the optional part as well otherwise osgi will not resolve
the bundle. 
 <Embed-Dependency>orai18n, ojdbc5, aqapi</Embed-Dependency>
 <Import-Package>*;resolution:=optional</Import-Package>




--
View this message in context: http://camel.465427.n5.nabble.com/Durable-subscriber-on-an-Oracle-Advanced-Queue-Topic-tp5790149p5790884.html
Sent from the Camel - Users mailing list archive at Nabble.com.