Re: why it used up all the heap space and hang even I specified memoryUsage limit?

2014-06-26 Thread Li Li
ducer don't have to consider how to save the messages itself. On Thu, Jun 26, 2014 at 8:35 PM, Christian Posta wrote: > Just curious why you have producer flow control off if you expect it to > honor memory limits? > > On Wednesday, June 25, 2014, Li Li wrote: > >>

why it used up all the heap space and hang even I specified memoryUsage limit?

2014-06-25 Thread Li Li
I gave 3GB total heap space of activemq, the XX:NewRatio=2. So new generation 1GB and old generation 2GB. And I also config memoryUsage limit="1 gb" ACTIVEMQ_OPTS_MEMORY="-Xms1G -Xmx3G -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSInitiatingOccupancyFraction=70 -XX:NewRatio=2" There are on

Re: queue size is zero but the Store percent used is 15%(of 50GB)

2014-06-18 Thread Li Li
> > >> 在 2014年6月18日,11:55,"Li Li [via ActiveMQ]" >> 写道: >> >> the messages of the queue are all consumed. But the store percent is >> not zero. How can I free the disk space?(the messages are persistent) >> >> >> If you reply to thi

queue size is zero but the Store percent used is 15%(of 50GB)

2014-06-17 Thread Li Li
the messages of the queue are all consumed. But the store percent is not zero. How can I free the disk space?(the messages are persistent)

why message can't be consumed in apollo?

2014-04-24 Thread Li Li
there are 400 consumers on a queue, and in the web ui, it says there are 526 messages. I clicked the message and it shows Messages(0) Sequence Codec Persistent Expires Prefetched Acquirer Size 17370 openwire true no false 217.78 kb what's wrong with it?

does apollo support message priority?

2014-04-16 Thread Li Li
I remeber activemq 5.9 support it.

Re: why apollo 1.7 only support openwire version 8?

2014-04-11 Thread Li Li
thanks. but why the latest version don't support newer version, what's new in v9 and v10? On Fri, Apr 11, 2014 at 10:06 PM, Timothy Bish wrote: > On 04/11/2014 08:01 AM, Li Li wrote: >> >> I am using activemq 5.9's jar files. how to let server support highe

why apollo 1.7 only support openwire version 8?

2014-04-11 Thread Li Li
I am using activemq 5.9's jar files. how to let server support higher version such as v9 or v10? Exception in thread "main" javax.jms.JMSException: Invalid version: 8, could not load org.apache.activemq.openwire.v8.MarshallerFactory at org.apache.activemq.util.JMSExceptionSupport.create(J

how to get queue size from java/c++ client using openwire protocol in apollo?

2014-04-11 Thread Li Li
I used to use activemq 5.9 and now want to switch to apollo. but I used to use Statistics Plugin to get queue size.

broken pipes exception

2014-04-10 Thread Li Li
the server can't work. it says: 2014-04-11 11:53:49,591 | WARN | Transport Connection to: tcp://192.168.11.172:45734 failed: java.net.SocketException: Broken pipe | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ InactivityMonitor Worker even I stop the server and restart it.

can't send message Timer already cancelled.

2014-04-08 Thread Li Li
in the server's log, only one line message is printed. 2014-04-09 10:03:17,222 | WARN | Transport Connection to: tcp://172.19.34.88:51245 failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///172.19.34.88:51245@61616 the exception sta

activemq stop failed

2014-04-03 Thread Li Li
very strange. the orginal pid is 11639. after stop. this pid not exist. but there is another activemq progress with different pid. it can still be visited by client $ ./bin/activemq stop INFO: Using default configuration (you can configure options in one of these file: /etc/default/activemq /home/

Re: statisticsBrokerPlugin not work

2014-04-03 Thread Li Li
I found the problem. the queue not yet exist so the program hangs On Thu, Apr 3, 2014 at 6:40 PM, Li Li wrote: > suddenly, the statisticsBrokerPlugin do not work(I have restarted the > sever today). I can send and receive messages. but I can't get queue > size from it. and t

statisticsBrokerPlugin not work

2014-04-03 Thread Li Li
suddenly, the statisticsBrokerPlugin do not work(I have restarted the sever today). I can send and receive messages. but I can't get queue size from it. and there is a warn: Queue ActiveMQ.Statistics.Destination.fetch_queue2 has no consumers fetch_queue2 is my queue from hawtio Percentage blocked

Re: server hang because of memory usage estimate not accurate?

2014-03-31 Thread Li Li
hen it "hanged"? And what constituted > hanging? Couldn't send more messages, couldn't receive messages? > > On Fri, Mar 28, 2014 at 12:23 AM, Li Li wrote: >> I am using the default configuration(maximum 4G heap) and > percentOfJvmHeap="70" /> >

Re: why temp message are not freed?

2014-03-28 Thread Li Li
I found the localhost directory's size is about 20GB >du -sh * 4.0K activemq-DC-TEST-1.pid 1.0M activemq.log 0 audit.log 89M kahadb 20G localhost why the disk space is not freed by activemq? On Fri, Mar 28, 2014 at 5:41 PM, Li Li wrote: > I found this log: > 2014-03-28 17:37

why temp message are not freed?

2014-03-28 Thread Li Li
I found this log: 2014-03-28 17:37:38,918 | INFO | Usage(default:temp:queue://TEST1:temp) percentUsage=99%, usage=21500083502, limit=21474836480, percentUsageMinDelta=1%;Parent:Usage(default:temp) percentUsage=100%, usage=21500083502, limit=21474836480, percentUsageMinDelta=1%: Temp Store is Full

Re: server hang because of memory usage estimate not accurate?

2014-03-28 Thread Li Li
sorry max heap is 1G, not 4G On Fri, Mar 28, 2014 at 3:23 PM, Li Li wrote: > I am using the default configuration(maximum 4G heap) and percentOfJvmHeap="70" /> > I send many small size TextMessages to server and it hangs > > I use jmap -heap and found that the free memo

server hang because of memory usage estimate not accurate?

2014-03-28 Thread Li Li
I am using the default configuration(maximum 4G heap) and I send many small size TextMessages to server and it hangs I use jmap -heap and found that the free memory is less than 100MB and the server can do nothing but do gc. but gc can't free anything. client can't even connect to server. I use .

fork/join in activemq?

2014-03-15 Thread Li Li
is it possible to implement fork and join pattern in activemq? in request/reply scenario, one request may product more than one message, so complete response is the aggregation of many individual response. Also, we have to deal with timeout of some response and aggregate partial responses. e.g. R

Re: can't connect to activemq

2014-03-12 Thread Li Li
hostname is the ip? where should I add this? On Tue, Mar 11, 2014 at 7:02 PM, Gary Tully wrote: > java.rmi.server.hostname may be the missing piece > On 10 Mar 2014 02:35, "Li Li" wrote: > >> I have successfully configure activemq to support jmx before. But in >>

Re: build active cms problems

2014-03-10 Thread Li Li
by using ./configure --with-openssl=/usr/local/ssl --with-apr=/usr/local/apr/ I have successfully make it. thanks. On Tue, Mar 11, 2014 at 8:57 AM, Li Li wrote: > openssl version > OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 > I am not a expert of linux, so how do I "remove" old ve

Re: build active cms problems

2014-03-10 Thread Li Li
openssl version OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 I am not a expert of linux, so how do I "remove" old version and install new version? On Mon, Mar 10, 2014 at 9:34 PM, Timothy Bish wrote: > On 03/10/2014 07:41 AM, Li Li wrote: >> >> 7. after I use ./configure --with

Re: build active cms problems

2014-03-10 Thread Li Li
c/main' make[1]: *** [all-recursive] 错误 1 make[1]: Leaving directory `/home/lili/activemqcpp/activemq-cpp-library-3.8.2' make: *** [all] 错误 2 On Mon, Mar 10, 2014 at 6:35 PM, Li Li wrote: > my environment: > 1. lsb_release -a > LSB Version: > :core-3.1-amd64:core-3.1-ia32:core-

build active cms problems

2014-03-10 Thread Li Li
my environment: 1. lsb_release -a LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch Distributor ID: RedHatEnterpriseServer Description:Red Hat Enterprise Linux Server release 5.5 (Tikanga) Release:5.5 Codename: Tika

can't connect to activemq

2014-03-09 Thread Li Li
I have successfully configure activemq to support jmx before. But in the new server machine, I can't get jmx working now. I follow all the instructions of http://activemq.apache.org/jmx.html 1. http://activemq.apache.org/schema/core"; useJmx="true" brokerName="localhost" dataDirectory="${activemq.

Re: how to get queue size by c++ client CMS?

2014-03-09 Thread Li Li
thanks. On Mon, Mar 10, 2014 at 9:52 AM, Timothy Bish wrote: > On 03/09/2014 09:19 PM, Li Li wrote: >> >> hi all, >> I know how to get queue size by jmx in java, but how to get it by >> c++ client? >> > Try this: > http://activemq.apache.org/stati

how to get queue size by c++ client CMS?

2014-03-09 Thread Li Li
hi all, I know how to get queue size by jmx in java, but how to get it by c++ client?

Re: how to wrapper a high level request-response thread-safe library

2014-03-06 Thread Li Li
I think I should deal with something like thread pool. I am familiar with java thread api such as ThreadPoolExecutor, Future, CompletionService. but is there any equivalence library in CMS? On Fri, Mar 7, 2014 at 10:40 AM, Li Li wrote: > hi all, > I want to wrapper a high level l

how to wrapper a high level request-response thread-safe library

2014-03-06 Thread Li Li
hi all, I want to wrapper a high level library using activemq to implement a request-reply service. the user of this library have 2 kind of api --synchronized blocking and asynchronized callback. usage1: MainThread: RequestResponseWrapper wrapper=new RequestRespon

Re: is tens of thousands of session feasible?

2014-03-05 Thread Li Li
Wed, Mar 5, 2014 at 6:09 PM, Noel OConnor wrote: > Be careful according to the JMS 1.02 spec JMS sessions aren't thread safe > so I don't recommend taking that approach. > I haven't used the individual acknowledge so you'll have to check that > yourself. > > &

Re: is tens of thousands of session feasible?

2014-03-05 Thread Li Li
IDUAL_ACKNOWLEDGE > > > On Wed, Mar 5, 2014 at 6:48 PM, Li Li wrote: > >> hi all, >> I want to process a batch of message using my own priority >> algorithm. But in JMS, I can't acknowledge a single message and can >> only acknowledge a session. So I decid

Re: is tens of thousands of session feasible?

2014-03-05 Thread Li Li
e JMS spec On Wed, Mar 5, 2014 at 5:08 PM, Noel OConnor wrote: > have you seen ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE > > see > http://activemq.apache.org/maven/apidocs/org/apache/activemq/ActiveMQSession.html#INDIVIDUAL_ACKNOWLEDGE > > > On Wed, Mar 5, 2014 at 6:48 PM, Li Li

is tens of thousands of session feasible?

2014-03-04 Thread Li Li
hi all, I want to process a batch of message using my own priority algorithm. But in JMS, I can't acknowledge a single message and can only acknowledge a session. So I decide to do it like this: 1. Create N(=1) sessions 2. using a thread to manage session acknowledge like:

Re: can I enable queue priority by plain java code

2014-03-04 Thread Li Li
, 2014 at 11:57 AM, Li Li wrote: > >> I am using the following code snippet to send messages to a queue. How >> to make priority queue enabled? >> class Producer{ >> private ActiveMQConnection conn; >> private QueueSender sender; >> private QueueSessio

build 5.9.0 from source failed

2014-03-03 Thread Li Li
[ERROR] Failed to execute goal on project activemq-leveldb-store: Could not resolve dependencies for project org.apache.activemq:activemq-leveldb-store:jar:5.9.0: Failed to collect dependencies at org.apache.hadoop:hadoop-test:jar:1.0.0 -> org.apache.mina:mina-core:jar:2.0.0-M5: Failed to read arti

Re: can a client "refuse" a message?

2014-03-03 Thread Li Li
ts > get resent to the queue. > > > On 3 March 2014 09:54, Li Li wrote: >> thank you very much. is it possible for client to send a message back >> to the front of the queue? I mean if consumer A can't process this >> message, it create a new message(the new message

Re: can I enable queue priority by plain java code

2014-03-03 Thread Li Li
y. > > Is that what you're asking? Otherwise you set the priority on a > message by using the JMS APIs. > > On Mon, Mar 3, 2014 at 3:39 AM, Li Li wrote: >> as in http://activemq.apache.org/how-can-i-support-priority-queues.html, >> I should enable queue priority

can I enable queue priority by plain java code

2014-03-03 Thread Li Li
as in http://activemq.apache.org/how-can-i-support-priority-queues.html, I should enable queue priority by xml configuration. is it possible to use java api to configure this?

Re: can a client "refuse" a message?

2014-03-03 Thread Li Li
. I know I can set message priority. But I don't know whether it's performant. On Mon, Mar 3, 2014 at 5:47 PM, Rob Davies wrote: > Beanstalkd might be a better fit for your use case - it's job based - and > iirc allows the client to reject jobs > > >> On 3 Mar 20

Re: can a client "refuse" a message?

2014-03-03 Thread Li Li
f stated it wouldn't be a simple solution. > > > On Mon, Mar 3, 2014 at 6:41 PM, Li Li wrote: > >> sorry to hear that. I need this feature very much. is it possible to >> "extend" activemq to achive this? is it difficult to modify the >> dispatch logic of

Re: can a client "refuse" a message?

2014-03-02 Thread Li Li
from my iPhone > >> On Mar 2, 2014, at 9:36 PM, "Li Li [via ActiveMQ]" >> wrote: >> >> hi all, >> can a queue message consumer "refuse" a message after receive a message? >> because a client don't know the message in advan

Re: can a client "refuse" a message?

2014-03-02 Thread Li Li
uld try rolling it back. If not (I > think) the message should be redelivered if you throw a runtime exception > from within the MDB. > > > On Mon, Mar 3, 2014 at 3:35 PM, Li Li wrote: > >> hi all, >> can a queue message consumer "refuse" a message after re

can a client "refuse" a message?

2014-03-02 Thread Li Li
hi all, can a queue message consumer "refuse" a message after receive a message? because a client don't know the message in advance. onMessage(Message msg){ if(CannotProcess(msg)){ //refuse this message } } what I need is: if the message can't be

what's the status of activemq real time?

2014-02-25 Thread Li Li
what's the status of this sub project? is there any real world use case? what's the desgin difference compared to non-realtime version?

Re: does AUTO_ACKNOWLEDGE guarantee once and only once semantic for queue consumer?

2014-02-24 Thread Li Li
thanks. Since JMS can't guarantee only once, it's the client's responsibility to make things correct. it should either using idempotent processing(running a task twice is no harm) or using other tools(such as zookeeper or database to make data consistent). So I think there is still many dirty work

Re: does AUTO_ACKNOWLEDGE guarantee once and only once semantic for queue consumer?

2014-02-24 Thread Li Li
for your consumers so that your consumer > can pull real task message from broker one by one. > Fast consumers can have a chance to pull more messages than slow consumers. > If consumers still can not process real tasks in time, increase consumers > or tune performance for consumers. > &

does AUTO_ACKNOWLEDGE guarantee once and only once semantic for queue consumer?

2014-02-24 Thread Li Li
I've read the jms specification and questions by google such as http://stackoverflow.com/questions/2991412/anyone-know-exactly-which-jms-messages-will-be-redelivered-in-client-acknowledge . But I still confused about it. Another question is: how can a consumer tell the broker to redelevery a mes

Re: why only one thread working?

2014-01-22 Thread Li Li
I found the problem. I have only 160 messages and all are dispatched to a single worker. how to avoid this? On Thu, Jan 23, 2014 at 11:27 AM, Li Li wrote: > I modified it to use multithreads, but still only one work. > I use jstack and find other threads are blocked by Messa

Re: why only one thread working?

2014-01-22 Thread Li Li
I modified it to use multithreads, but still only one work. I use jstack and find other threads are blocked by Message msg = receiver.receive(); public class Worker extends Thread{ public Worker() throws Exception{ recvConnFactory = new ActiveMQConnectionFactory( queueC

why only one thread working?

2014-01-22 Thread Li Li
public class Worker implements MessageListener{ public Worker() throws Exception{ recvConnFactory = new ActiveMQConnectionFactory( queueConnString); recvQConn = recvConnFactory.createQueueConnection(); recvQConn.start(); recvSession = recvQConn.cr

multithreads share a session problem

2014-01-22 Thread Li Li
hi all I want to share a session among many threads and after do real work the message is acknowledged: class Dispatcher implements MessageListener{ Thread[] workers; public void init(){ session = connection.createQueueSession(false, Session.CLIENT_ACKNOWLEDGE);

how to set queue's max size?

2014-01-07 Thread Li Li
I am using activemq to implement the producer and consumer model. the producer simply dispatch jobs to queue and consumer do the hard job. How can I config the queue's max size? That is, if size of message not consumed exceed this value, then producer will be blocked(or faied with some exception in

Re: how to make sure consumer correctly fullfil a task?

2013-12-29 Thread Li Li
in-activemq.html > > On Thu, Dec 26, 2013 at 11:52 PM, Li Li wrote: >> hi all, >> activemq ensure a message sent to a queue will be consumed by >> exactly one consumer. But what happens when the consumer receive this >> message and crash and don't do anything

how to make sure consumer correctly fullfil a task?

2013-12-26 Thread Li Li
hi all, activemq ensure a message sent to a queue will be consumed by exactly one consumer. But what happens when the consumer receive this message and crash and don't do anything with this message. How can I ensure the consumer really did his job? how to ensure if the consumer crashed, the mes