Re: can I enable queue priority by plain java code

2014-03-03 Thread Noel OConnor
http://docs.oracle.com/javaee/5/api/javax/jms/MessageProducer.html#setPriority(int) On Tue, Mar 4, 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; > pri

Re: Inflight Count for topics not correct.

2014-03-03 Thread khandelwalanuj
Yes, I am looking at topic itself. TopicSubscriber ? I didn't understand, I think there nothing like "inflightCount" for topic subscribers. When subscriber is there, it keeps on acknowledging the messages sent from broker. But as soon as subscriber goes down, the messages which are not yet ackno

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: Deadlock on broker (thread dumps included)

2014-03-03 Thread artnaseef
Consuming and producing on the same connection can lead to deadlocks because producer-flow-control blocks the entire connection. It is hard to tell from the description of the usage pattern if that could be occurring in your case. Sent from my iPhone > On Mar 3, 2014, at 9:55 AM, "jmachina [

Re: can a client "refuse" a message?

2014-03-03 Thread Li Li
there are some questions. 1. how cant a consumer reject a message? throw a runtimeexception? 2. which parameter control retry times before moving to dead letter queue? 3. what's maximumRedeliveries mean in the following xml? does it mean 4 times redelivery to a single consumer before move to de

Re: can I enable queue priority by plain java code

2014-03-03 Thread Li Li
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 QueueSession session; public Producer() throws JMSException{ ActiveMQConnectionFactory connectionFactory = new

Re: activemq - delete consumed messages

2014-03-03 Thread turkuaz07
That's right, It defaults to 32mb for log files but I mean db.data file -- View this message in context: http://activemq.2283324.n4.nabble.com/activemq-delete-consumed-messages-tp4678437p4678481.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Deadlock on broker (thread dumps included)

2014-03-03 Thread jmachina
The majority of our connections have both subscribers and producers, but in most cases we subscribe to a set of topics, and publish to a different set of topics (with the same connection). Why are you suggesting that we avoid this, do you have a longer explanation or a link to docs? Our connections

Re: activemq - delete consumed messages

2014-03-03 Thread artnaseef
What is the data file size limit? It defaults to 32mb. The active data file is never removed. Sent from my iPhone > On Mar 3, 2014, at 12:03 AM, "turkuaz07 [via ActiveMQ]" > wrote: > > Thank you artnaseef, but I have tested a scenario like that; > > I sent 1.000.000 object messages to the

Re: Deadlock on broker (thread dumps included)

2014-03-03 Thread Chirag Pujara
are your producer and consumer share same connection? If yes try to avoid that. I had similar problem. Also if you are using spring jmstemplate read following link. http://singztechmusings.wordpress.com/2011/06/21/pooledconnectionfactory-vs-cachingconnectionfactory-which-one-is-a-perfect-match-for

Re: Deadlock on broker (thread dumps included)

2014-03-03 Thread jmachina
The consumers have not been getting blocked up (that we know of), and we would hope that messages would be discarded for those blocked consumers rather than block the whole message broker and hang the system. (far preferable to have one consumer not receive messages than have the whole system becom

Re: Deadlock on broker (thread dumps included)

2014-03-03 Thread Christian Posta
Tell a little more about your consumers.Are they getting blocked up? How often are you creating destinations/temp destinations? I don't see a network of brokers in this config... you're not using any, right? On Fri, Feb 28, 2014 at 11:30 AM, jmachina wrote: > Experiencing a recurring issue with o

Re: can I enable queue priority by plain java code

2014-03-03 Thread Christian Posta
If you build your broker using the java API you can do this by creating the policy entry and using its setters directly. 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/

Re: BrokerContainer & SpringBrokerContainerFactory classes

2014-03-03 Thread Christian Posta
Take a closer look at the API for Broker Factory Bean: http://activemq.apache.org/maven/5.9.0/apidocs/org/apache/activemq/xbean/BrokerFactoryBean.html You can pass in the resource/config file to the constructor, then call "getBroker()" ..something like this: protected BrokerService createBrok

Re: BrokerContainer & SpringBrokerContainerFactory classes

2014-03-03 Thread tvijayram
Hi Christian, Thanks for the help. In our application we are trying to create a Broker Container container by using the SpringBrokerContainerFactory's newInstance method. SpringBrokerContainerFactory's.newInstance(Resource). But in BrokerFactoryBean we don't have this method. And I tried to use s

Deadlock on broker (thread dumps included)

2014-03-03 Thread jmachina
Experiencing a recurring issue with our activeMQ broker, where it will stop servicing new connections (any new connection from the client side hangs on establishing a connection). Thread dump attached, and a small selection of the dump pasted below. Our configuration is also listed below (and attac

Re: can a client "refuse" a message?

2014-03-03 Thread Gary Tully
peek at the broker redelivery plugin - http://activemq.apache.org/message-redelivery-and-dlq-handling.html#MessageRedeliveryandDLQHandling-BrokerRedelivery(v5.7) that is most of what you want, the only caveat is that the number of retries is not auto tuned to the number of consumers so you will ju

Re: ActiveMQ Perl Consumer error: cannot sysread(): EOF

2014-03-03 Thread khandelwalanuj
In addition to the above post if I use sleep_time of 5 seconds I am not getting any exceptions. It is working fine. As I increase the value of sleep_time, more I am getting the exceptions. In case of sleep_time = 30, I am getting lots of exceptions, only around once in 4 or 5 time it gets successfu

ActiveMQ Perl Consumer error: cannot sysread(): EOF

2014-03-03 Thread khandelwalanuj
Hi, I am using use "Net::STOMP::Client" module for my perl consumer. I am talking about the case when there is a producer on the topic/queue on which this consumer is connecting, so I keeps receiving the frames. I debug and checked the frames are like: *"Net::STOMP::Client::Frame=HASH(0x3ec26f0)"*

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
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's content is the same as the old one) and put it to the front of the queue(so it can be consumed soon). I know I

Re: can a client "refuse" a message?

2014-03-03 Thread Rob Davies
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 2014, at 09:41, Li Li wrote: > > thank you. I want to know now is that to achieve my goal(as I > described before), is it suitable to use activemq(or activemq+camel). > i

Re: can a client "refuse" a message?

2014-03-03 Thread Li Li
thank you. I want to know now is that to achieve my goal(as I described before), is it suitable to use activemq(or activemq+camel). if it's very hard to implement with activemq(+camel), I will try other solutions. or any other solutions are very welcomed. I could use any related solution(e.g. rabbi

Re: can a client "refuse" a message?

2014-03-03 Thread Noel OConnor
Rather than trying to change activemq you could look at implementing something with activemq and camel to provide this custom dispatch and redelivery mechanism. But as artnaseef 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 t