activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthrope>
Subject Re: JDBC Master Slave
Date Tue, 12 Dec 2006 16:03:19 GMT

    Thanks for the response. I am using the config file as-is from the
example. I am using the jdbcPersistenceAdapter element, and here's what I

- I start activemq on port 5616 and it duly starts up, taking over as the
- I start a second instance with exactly the same configuration, and it
fails to start, because it tries to bind to 5616
- I change the configuration to use port 5626, and the slave starts, but
surprisingly, it is also able to become the master (as per the logs)
- I don't quite understand how both end up becoming the master, but perhaps
it's just how it's being logged?
- I run the 'producer' example with 100000 messages of 5000 bytes each
(using the failover uri to connect), and am able to only push through about
16000 messages to a queue called TEST.FOO before the producer dies with an
exception trying to create a connection
- I kill the master broker and then run the consumer example with the
failover uri and am able to successfully extract about 7800 messages before
the client shuts down with a JMS exception
- I run the consumer again, and am able to drain the rest of the messages

I'll run more extensive tests, re-introducing the master to see it it does
take over indeed, but am a bit baffled as to why the slave also thinks it is
the master when it is started. I was under the impression that the slave
would not start any connectors, but it does indeed start all its connectors
when started.

Am I missing something here? This behaviour seems more like what we'd expect
from a network of brokers as opposed to a Master Slave configuration. Do I
need to tell the slave explicitly what the masterConnectorURI is?

Thanks, and apologies for the long post,

James.Strachan wrote:
> On 12/12/06, Anthrope <> wrote:
>> Thanks for this information; it clarifies things. On to the next question
>> now. I was able to get ActiveMQ to use a MySQL repository, and noticed
>> that
>> there were three tables created:
>> activemq_msgs
> Looks about right.
>> I ran a producer and dumped 10 messages onto a queue (without consuming
>> them), but saw nothing in the activemq_msgs table.
> You're definitely using the <jdbcPersistenceAdapter/> element right?
> i.e. not using the journal
>> I assume this is probably
>> because the server caches a certain amount before needing to use the
>> database. What I was a bit surprised by was the fact that there was one
>> row
>> in the ACTIVEMQ_LOCK table (which has 3 columns, ID, TIME and
>> which had 1 for the ID column, and NULLs for TIME and BROKER_NAME
>> columns.
>> Is that what we ought to expect?
> Yeah, that sounds right.
>> If it is, then I'd hazard a guess that each
>> broker will have to have its own database instance. Is that correct?
> Each group of 1 master and N slaves shares a single database instance.
> Or another way of saying that is each master requires its own database
> instance
> -- 
> James
> -------

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message