How to create connections to different brokers by using one ConnectionFactory?

2011-09-14 Thread jessezbj
How to create connections to different brokers by using one ConnectionFactory? Can the code be written as ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(); for each url in URLs { connectionFactory.setBrokerURL(url); Connection connection = connectionFactory.createCon

Re: How to disable ActiveMQ 5.4.2 failover successful connection by editing log4j.properties

2011-08-17 Thread jessezbj
Thank you very much! I am sure the log4j.properties loaded by my client program is the one I am editing. but failover connection INFO logging still comes out. could you show me an example log4j.properties file content which can work ? -- View this message in context: http://activemq.228332

How to disable ActiveMQ 5.4.2 failover successful connection by editing log4j.properties

2011-08-16 Thread jessezbj
I tried to set log4j.logger.org.apache.activemq=ERROR in log4j.properties used by client code. but the INFO message of successful connection always come out. how to fix it? -- View this message in context: http://activemq.2283324.n4.nabble.com/How-to-disable-ActiveMQ-5-4-2-failover-successf

How to connect to multiple brokers?

2011-08-14 Thread jessezbj
I want to connect the client application to multiple brokers, then I can balance the message sending to different brokers. Now I use the method of creating multiple connection factories in the client, each with different connection uri. that is. for(uri in uri1... uriN) { new ActiveMQConnectio

Could anyone give an explanation about the detailed process of sync sending and async sending in ActiveMQ?

2011-07-18 Thread jessezbj
Could anyone give an explanation about the detailed process of sync sending and async sending in ActiveMQ? Especially for sync sending, is it the synchronization between sender and broker, or the sender and receiver? And what will happen if you send message across a network of brokers? Thanks.

In a network of broker, how does subscription propagated?

2011-07-11 Thread jessezbj
Could it be possible that the process of propagation of the subscription to all brokers is asynchronous and takes long time? As a result, the broker which directly connects to the sender doesn't know how to forward the message? -- View this message in context: http://activemq.2283324.n4.nabble.

Re: message lost under persistent and sync sending mode

2011-06-28 Thread jessezbj
The main problem here is that it is really hard to repeat. I am using a network of brokers for large distributed application. Message loss happens about 2% of total execution times. That is I execute 100 times of my application, may be 2 times, message lost could happen. Do you have any suggest

message lost under persistent and sync sending mode

2011-06-26 Thread jessezbj
message lost under persistent and sync sending mode, according to many documents, persistent and sync sending mode should be reliable. How to resolve this problem? -- View this message in context: http://activemq.2283324.n4.nabble.com/message-lost-under-persistent-and-sync-sending-mode-tp3

Is it OK to do sending in Consumers onMessage function?

2011-06-26 Thread jessezbj
If I do sending in onMessage function under persistent and sync mode. Is it fine? Will it cause deadlock in some cases? Or should I create a new thread to do sending? -- View this message in context: http://activemq.2283324.n4.nabble.com/Is-it-OK-to-do-sending-in-Consumers-onMessage-function-

Re: Get exception in broker networks java.net.SocketException: Broken pipe

2011-06-25 Thread jessezbj
I was using DurableSubscriber and I already set static://(tcp://brokerb:61616?wireFormat.maxInactivityDuration=0) for broker network connection, and it can send for a while but finally get broken. What is the reason? -- View this message in context: http://activemq.2283324.n4.nabble.com/Get-excep

Get exception in broker networks java.net.SocketException: Broken pipe

2011-06-25 Thread jessezbj
I have several brokers which form a network of brokers, then I am sending messages each about 80kb , here is the exception I get, Caught an exception processing local command | org.apache.activemq.network.DemandForwardingBridgeSupport | BrokerService[broker-149-165-229-50] Task java.net.SocketExc

How to send NON_PERSISTENT sending mode in configuration URI?

2011-06-24 Thread jessezbj
for producers, we can use non -persistent sending mode by the following code, producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); How to configure this persistent or non-persistent mode through a URI configuration, and can I configure this feature not only for client and broker connection b

Re: Can ActiveMQ send GB size message?

2011-06-23 Thread jessezbj
But how about MB level sized message? I have to change the way of sending based on the message size. Thanks -- View this message in context: http://activemq.2283324.n4.nabble.com/Can-ActiveMQ-send-GB-size-message-tp3603404p3620713.html Sent from the ActiveMQ - User mailing list archive at Nabbl

Can ActiveMQ send GB size message?

2011-06-16 Thread jessezbj
Or what is the biggest size of the message which can be sent through ActiveMQ? -- View this message in context: http://activemq.2283324.n4.nabble.com/Can-ActiveMQ-send-GB-size-message-tp3603404p3603404.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: In a network of brokers, Are the broker names required to be different?

2011-03-07 Thread jessezbj
But I tried to use the same broker name. Everything looks proper. So I am thinking if the broker names are not required to be different now. If it is true, configuration for multi brokers will be much easier. -- View this message in context: http://activemq.2283324.n4.nabble.com/In-a-n

In a network of brokers, Are the broker names required to be different?

2011-03-07 Thread jessezbj
In a network of brokers, Are the broker names required to be different? I am using ActiveMQ 5.4.2 and using multicast mode. I tried to use them with the same broker name. They look fine. But the book ActiveMQ in Action says they should be all different, the reasons? If all the names should

In a network of brokers, Are the broker names required to be different?

2011-03-07 Thread jessezbj
In a network of brokers, Are the broker names required to be different? I am using ActiveMQ 5.4.2 and using multicast mode. I tried to use them with the same broker name. They look fine. But the book ActiveMQ in Action says they should be all different, reason? If all the names should be dif

In a network of brokers, Are the broker names required to be different?

2011-03-07 Thread jessezbj
In a network of brokers, Are the broker names required to be different? I am using ActiveMQ 5.4.2 and using multicast mode. I tried to use them with the same broker name. They look fine. But the book ActiveMQ in Action says they should be all different. If all the names should be different, how

In a network of brokers, Are the broker names required to be different?

2011-03-06 Thread jessezbj
In the newest version 5.4.2 I tested with two brokers with the same names but different ports on one machine. It seems work. Are the broker names required to be different? what about other settings? I am wondering if I can use only one configuration file for all brokers (assuming I am usi