Is it possible to specify "send timeout" when using FailoverTransport?

2009-03-16 Thread WhiteSock
Hi all, When sending messages via FailoverTransport(ActiveMQ 5.2.0), the sender is blocked during the reconnection process. Is it possible to specify send timeout ? In ActiveMQ 4.0, there is a transport option timeout -1 Enables timeout on send operations (in miliseconds

Re: Async error occurred java.lang.NullPointerException

2008-12-15 Thread WhiteSock
s exception? > > The simple fix is to add the null check here also, but it is not clear > from the code why destination would be null as dispatch would have to > have been called prior to an acknowledgement. > The not null checks elsewhere would indicate that it is necessary however.

ActiveMQ Daemon Threads

2008-12-15 Thread WhiteSock
Hi all, I want to use daemon threads in ActiveMQ 5.2, so I made the following changes: 1 tcp://localhost:61616?daemon=true 2 ActiveMQConnection amqConnection = (ActiveMQConnection)connection; amqConnection.setSessionTaskRunner(new TaskRunnerFactory("ActiveMQ Session Task", ThreadPriorit

Async error occurred java.lang.NullPointerException

2008-12-10 Thread WhiteSock
Hi all, I got the following error in activemq.log, ActiveMQ's version is 5.2.0. Do you have any idea? 2008-12-10 21:44:04,485 [.15.2.125:47814] ERROR Service - Async error occurred: java.lang.NullPointerException java.lang.NullPointerException at org.apache

Question about ActiveMQ's worker thread

2008-12-03 Thread WhiteSock
Hi all, 1 a) Create a new connection & session for every consumer which wants to receive message from a destination. b) Multiple consumer share the same connection & session. Is there any difference (such as performance) between a & b ? 2 When I create a consumer to receive message, I found th

Question about RoundRobbinDispatchPolicy

2008-11-26 Thread WhiteSock
1 Start consumer A which subscribes Queue1, it receives the message without delay. 2 Start consumer B which subscribes Queue1, it delays 5 seconds after receiving every messages(sleep 5 seconds in onMessage method). 3 Start producer C and send a message(message0, message1, message2, message3...) t

Re: How to catch the event when the "FAILOVER" connection goes down and swithes to another broker

2008-11-25 Thread WhiteSock
Hi, You can use the following codes: ActiveMQConnection con = (ActiveMQConnection)connection; con.addTransportListener(new TransportListener() { @Override public void onCommand(Object command) { } @Override public void onException(IOException error)

Re: Negtive MessageCountAwaitingAcknowledge & DispatchedQueueSize on JConsol

2008-11-25 Thread WhiteSock
This problem still exists in ActiveMQ 5.2 -- View this message in context: http://www.nabble.com/Negtive-MessageCountAwaitingAcknowledge---DispatchedQueueSize-on-JConsole-tp20496111p20679908.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Negtive MessageCountAwaitingAcknowledge & DispatchedQueueSize on JConsol

2008-11-25 Thread WhiteSock
I was able to reproduce this problem on ActiveMQ 5.1 1. Run SimpleBroker Please run MySql first.(I want to use JDBC Master/Slave cluster in production environment) 2. Run SimpleConsumer In SimpleConsumer.java, it actually starts two MessageConsumers: * the first MessageConsumer is block

Re: Negtive MessageCountAwaitingAcknowledge & DispatchedQueueSize on JConsol

2008-11-20 Thread WhiteSock
> Vadim. > > On Thu, Nov 13, 2008 at 11:55 PM, WhiteSock <[EMAIL PROTECTED]> > wrote: >> >> When I use JConsole to monitor ActiveMQ5.1, I find that the >> >> MessageCountAwaitingAcknowledge and DispatchedQueueSize of >> SubscriptionView >> are

Negtive MessageCountAwaitingAcknowledge & DispatchedQueueSize on JConsole

2008-11-13 Thread WhiteSock
When I use JConsole to monitor ActiveMQ5.1, I find that the MessageCountAwaitingAcknowledge and DispatchedQueueSize of SubscriptionView are negative from time to time, especially when the producer is very fast and the consumer is relatively slow. This is the screen shot http://www.nabble.com/