You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by rstephens <rs...@previsor.com> on 2009/06/03 05:13:33 UTC

JDBC Master/Slave Problems

Trying to test AMQ 5.2 with JDBC master slave...
I am running two brokers on my dev machine, with separate ports...configs
attached...
http://www.nabble.com/file/p23844659/broker1.xml broker1.xml 
http://www.nabble.com/file/p23844659/broker2.xml broker2.xml 
I am testing with the example producer and consumer...url:
failover:(tcp://localhost:61616,tcp://localhost:61617)

I see the first broker start...I start the second one, and it waits for db
lock...
After the producer and consumer process ~500 msgs, I "kill" the first broker
(ctrl-c) and see the second broker startup...
I see more messages from producer/consumer after failover connect to
broker2, but I get many errors like:
2009-06-02 22:46:23,619 [127.0.0.1:62897] ERROR Service                       
- Async error occurred: javax.jms.JMSException: Unmatched acknowledege:
MessageAck {commandId = 900, responseRequired = false, ackType = 2,
consumerId = ID:rstephensvista-62872-1243997152219-0:0:1:1, firstMessageId =
ID:rstephensvista-62880-1243997174981-0:0:1:1:895, lastMessageId =
ID:rstephensvista-62880-1243997174981-0:0:1:1:895, destination =
queue://TEST.FOO, transactionId = null, messageCount = 1}; Could not find
Message-ID ID:rstephensvista-62880-1243997174981-0:0:1:1:895 in
dispatched-list (start of ack)
javax.jms.JMSException: Unmatched acknowledege: MessageAck {commandId = 900,
responseRequired = false, ackType = 2, consumerId =
ID:rstephensvista-62872-1243997152219-0:0:1:1, firstMessageId =
ID:rstephensvista-62880-1243997174981-0:0:1:1:895, lastMessageId =
ID:rstephensvista-62880-1243997174981-0:0:1:1:895, destination =
queue://TEST.FOO, transactionId = null, messageCount = 1}; Could not find
Message-ID ID:rstephensvista-62880-1243997174981-0:0:1:1:895 in
dispatched-list (start of ack)
	at
org.apache.activemq.broker.region.PrefetchSubscription.assertAckMatchesDispatched(PrefetchSubscription.java:438)
	at
org.apache.activemq.broker.region.PrefetchSubscription.acknowledge(PrefetchSubscription.java:188)
	at
org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:373)
	at
org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:462)
	at
org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:194)
	at
org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
	at
org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
	at
org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85)
	at
org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:456)
	at org.apache.activemq.command.MessageAck.visit(MessageAck.java:205)
	at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
	at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
	at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
	at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
	at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
	at java.lang.Thread.run(Thread.java:619)

I also get JMS exceptions con consumer...

Thoughts?
-- 
View this message in context: http://www.nabble.com/JDBC-Master-Slave-Problems-tp23844659p23844659.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

SOLVED: JDBC Master/Slave Problems

Posted by rstephens <rs...@previsor.com>.
:drunk: %-|
Ok, it turns out that for JDBC Master/Slave, you actually need to store the
messages in the DB...go figure...

So using the example producer/consumer's you need to specify durable
queues...

Sorry for the confusion...
-- 
View this message in context: http://www.nabble.com/JDBC-Master-Slave-Problems-tp23844659p23893981.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: JDBC Master/Slave Problems

Posted by rstephens <rs...@previsor.com>.
So, if Master/Slave isn't working, what's the best solution for HA?
-- 
View this message in context: http://www.nabble.com/JDBC-Master-Slave-Problems-tp23844659p23891927.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: JDBC Master/Slave Problems

Posted by Gary Tully <ga...@gmail.com>.
I think a 5.3-SNAPSHOT will give better results. There have been a few fixes
in the area of "unmatched ack" reporting and failover.

2009/6/3 rstephens <rs...@previsor.com>

>
> Trying to test AMQ 5.2 with JDBC master slave...
> I am running two brokers on my dev machine, with separate ports...configs
> attached...
> http://www.nabble.com/file/p23844659/broker1.xml broker1.xml
> http://www.nabble.com/file/p23844659/broker2.xml broker2.xml
> I am testing with the example producer and consumer...url:
> failover:(tcp://localhost:61616,tcp://localhost:61617)
>
> I see the first broker start...I start the second one, and it waits for db
> lock...
> After the producer and consumer process ~500 msgs, I "kill" the first
> broker
> (ctrl-c) and see the second broker startup...
> I see more messages from producer/consumer after failover connect to
> broker2, but I get many errors like:
> 2009-06-02 22:46:23,619 [127.0.0.1:62897] ERROR Service
> - Async error occurred: javax.jms.JMSException: Unmatched acknowledege:
> MessageAck {commandId = 900, responseRequired = false, ackType = 2,
> consumerId = ID:rstephensvista-62872-1243997152219-0:0:1:1, firstMessageId
> =
> ID:rstephensvista-62880-1243997174981-0:0:1:1:895, lastMessageId =
> ID:rstephensvista-62880-1243997174981-0:0:1:1:895, destination =
> queue://TEST.FOO, transactionId = null, messageCount = 1}; Could not find
> Message-ID ID:rstephensvista-62880-1243997174981-0:0:1:1:895 in
> dispatched-list (start of ack)
> javax.jms.JMSException: Unmatched acknowledege: MessageAck {commandId =
> 900,
> responseRequired = false, ackType = 2, consumerId =
> ID:rstephensvista-62872-1243997152219-0:0:1:1, firstMessageId =
> ID:rstephensvista-62880-1243997174981-0:0:1:1:895, lastMessageId =
> ID:rstephensvista-62880-1243997174981-0:0:1:1:895, destination =
> queue://TEST.FOO, transactionId = null, messageCount = 1}; Could not find
> Message-ID ID:rstephensvista-62880-1243997174981-0:0:1:1:895 in
> dispatched-list (start of ack)
>        at
>
> org.apache.activemq.broker.region.PrefetchSubscription.assertAckMatchesDispatched(PrefetchSubscription.java:438)
>        at
>
> org.apache.activemq.broker.region.PrefetchSubscription.acknowledge(PrefetchSubscription.java:188)
>        at
>
> org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:373)
>        at
>
> org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:462)
>        at
>
> org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:194)
>        at
> org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
>        at
> org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
>        at
>
> org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85)
>        at
>
> org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:456)
>        at org.apache.activemq.command.MessageAck.visit(MessageAck.java:205)
>        at
>
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305)
>        at
>
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179)
>        at
>
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
>        at
>
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
>        at
>
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
>        at
>
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
>        at java.lang.Thread.run(Thread.java:619)
>
> I also get JMS exceptions con consumer...
>
> Thoughts?
> --
> View this message in context:
> http://www.nabble.com/JDBC-Master-Slave-Problems-tp23844659p23844659.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com