activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LE Phi Long <phi-long...@atos.net>
Subject RE: right config for activeMQ to handle persisted messages through Oracle
Date Wed, 30 Nov 2011 07:47:40 GMT
Hi gary,
Thanks for your answer.
My two boxes are quite different. The first one produce messages sent to the broker and the
second one consume this messages from the broker.
For different reasons in production, I can't instanciate the second box during day but only
during night.
8:00 AM broker + Box1 up
7:00 PM stop
7:15 PM broker + Box2 up

Messages handle by the broker seem not to be consume by the box 2

Regards,
Phi-Long LE

-----Message d'origine-----
De : Gary Tully [mailto:gary.tully@gmail.com]
Envoyé : mardi 29 novembre 2011 17:57
À : users@activemq.apache.org
Objet : Re: right config for activeMQ to handle persisted messages through Oracle

note the journal does not get replicated, so if you want to use two boxes, you need to use
jdbc without a journal. But with a normal shutdown, I would expect the journal is in sync
with the db. Is that the case?

On 29 November 2011 16:09, LE Phi Long <phi-long.le@atos.net> wrote:
> Folks,
>
> I can't figure out why my configuration doesn't work.
>
> My configuration: activeMQ 5.4.2 servicemix 3.3.2
>
> One activeMQ, 2 servicemix connected to activeMQ (box 1 and box2, box 1 produces messages
to box2). In this configuration everything works fine.
> When I try to instanciate only activeMQ and Box1, using Oracle connected to activeMQ,
I can check messages produced by Box1 in my Oracle schema.
> Then stop activeMQ and start it again just with box2 which should compute messages from
box1.
>
> An error occurs in servicemix log:
> INFO  - AutoDeploymentService          - Directory: hotdeploy:
> Finished installation of archive:
> servicemix-shared-2010.01-installer.zip
> WARN  - ActiveMQManagedConnection      - Connection failed:
> javax.jms.JMSException: Cannot remove a consumer from a connection
> that had not been registered:
> ID:vhmucj3.helios.cp-55010-1322581269935-2:7
> 75454 [ActiveMQ Connection Worker: tcp:///10.78.252.223:6666] WARN
> org.apache.geronimo.connector.outbound.GeronimoConnectionEventListener
> - connectionErrorOccurred called with null
> javax.jms.JMSException: Cannot remove a consumer from a connection
> that had not been registered:
> ID:vhmucj3.helios.cp-55010-1322581269935-2:7
>        at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSuppor
> t.java:49)
>        at
> org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnec
> tion.java:1784)
>        at
> org.apache.activemq.ActiveMQConnection$2$1.run(ActiveMQConnection.java
> :1705)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu
> tor.java:897)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> java:919)
>        at java.lang.Thread.run(Thread.java:736)
> Caused by: java.lang.IllegalStateException: Cannot remove a consumer
> from a connection that had not been registered:
> ID:vhmucj3.helios.cp-55010-1322581269935-2:7
>        at
> org.apache.activemq.broker.TransportConnection.processRemoveConsumer(T
> ransportConnection.java:565)
>        at
> org.apache.activemq.command.RemoveInfo.visit(RemoveInfo.java:76)
>        at
> org.apache.activemq.broker.TransportConnection.service(TransportConnec
> tion.java:311)
>        at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportCo
> nnection.java:185)
>        at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilte
> r.java:69)
>        at
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireForma
> tNegotiator.java:113)
>        at
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMo
> nitor.java:228)
>        at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupp
> ort.java:83)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java
> :220)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:2
> 02)
>
>
> activemq.log:
> 2011-11-29 16:42:27,830 | DEBUG | box1-direct-technical-split.event.1
> toPageIn: 0, Inflight: 0, pagedInMessages.size 1, enqueueCount: 0,
> dequeueCount: 1 | org.apache.activemq.broker.region.Queue |
> BrokerService[cocololo] Task
> 2011-11-29 16:42:27,830 | DEBUG | cocololo removing consumer:
> ID:vhmucj3.helios.cp-55010-1322581269935-2:7:-1:2 for destination:
> topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopi
> c | org.apache.activemq.broker.region.AbstractRegion | ActiveMQ
> Transport: tcp:///10.78.252.1:55039
> 2011-11-29 16:42:27,830 | DEBUG | remove connection id:
> ID:vhmucj3.helios.cp-55010-1322581269935-2:7 |
> org.apache.activemq.broker.TransportConnection | ActiveMQ Transport:
> tcp:///10.78.252.1:55039
> 2011-11-29 16:42:27,999 | DEBUG | Transport failed:
> java.io.EOFException |
> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
> Transport: tcp:///10.78.252.1:55039 java.io.EOFException
>        at java.io.DataInputStream.readInt(DataInputStream.java:386)
>        at
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.j
> ava:269)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTranspor
> t.java:227)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java
> :219)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:2
> 02)
>        at java.lang.Thread.run(Thread.java:736)
>
>
> here is my activeMQ config:
>
> <beans
>  xmlns="http://www.springframework.org/schema/beans"
>  xmlns:amq="http://activemq.apache.org/schema/core"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>  http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd">
>
>    <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderCon
> figurer">
>        <property name="locations">
>
> <value>file:${activemq.base}/conf/credentials.properties</value>
>        </property>
>    </bean>
>
>    <broker xmlns="http://activemq.apache.org/schema/core"
> brokerName="cocololo" brokerId="tamoule" persistent="true"
> dataDirectory="${activemq.base}/pll" useJmx="true">
>
>        <destinationPolicy>
>            <policyMap>
>              <policyEntries>
>                <policyEntry queue=">" producerFlowControl="false"/>
>              </policyEntries>
>            </policyMap>
>        </destinationPolicy>
>
>        <managementContext>
>            <managementContext createConnector="true"/>
>        </managementContext>
> <persistenceFactory>
>        <journalPersistenceAdapterFactory journalLogFiles="1"
> dataDirectory="${activemq.base}/pll" dataSource="#oracle-ds">
>        </journalPersistenceAdapterFactory>
>        </persistenceFactory>
>                <transportConnectors>
>            <transportConnector name="openwire"
> uri="tcp://10.78.252.223:6666?connectionTimeout=0&amp;wireFormat.maxIn
> activityDuration=0"/>
>        </transportConnectors>
>
>    </broker>
>        <bean id="oracle-ds"
> class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>                <property name="driverClassName"
> value="oracle.jdbc.driver.OracleDriver"/>
>                <property name="url"
> value="jdbc:oracle:thin:@vhmucj3:15212:HPRD10"/>
>                <property name="username" value="amq"/>
>                <property name="password" value="amq"/>
>                <property name="maxActive" value="200"/>
>                <property name="poolPreparedStatements" value="true"/>
>        </bean>
>
>    <!--import resource="jetty.xml"/-->
>
> </beans>
>
>
> What I would be able to do is to consume messages produced by Box1 during the day by
Box2 during the night.
>
> Any help would be appreciated.
>
> Regards,
> Phi-Long LE
>
> ________________________________
>
> Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de
ses destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez
ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit?
du message ne pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos ne pourra
?tre engag?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour
maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie
? cet ?gard et sa responsabilit? ne saurait ?tre engag?e pour tout dommage r?sultant d'un
virus transmis.
>
> This e-mail and the documents attached are confidential and intended solely for the addressee;
it may also be privileged. If you receive this e-mail in error, please notify the sender immediately
and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability
cannot be triggered for the message content. Although the sender endeavors to maintain a computer
virus-free network, the sender does not warrant that this transmission is virus-free and will
not be liable for any damages resulting from any virus transmitted.



--
http://fusesource.com
http://blog.garytully.com

________________________________


Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de
ses destinataires. Il peut également être protégé par le secret professionnel. Si vous
recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire.
L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe
Atos ne pourra être engagée quant au contenu de ce message. Bien que les meilleurs efforts
soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne
aucune garantie à cet égard et sa responsabilité ne saurait être engagée pour tout dommage
résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee;
it may also be privileged. If you receive this e-mail in error, please notify the sender immediately
and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability
cannot be triggered for the message content. Although the sender endeavors to maintain a computer
virus-free network, the sender does not warrant that this transmission is virus-free and will
not be liable for any damages resulting from any virus transmitted.

Mime
View raw message