Re: Failed to build body from bytes
Hi Failed to build body from bytes. Reason: java.io.IOException: No ClassLoaders found for: com.corpus.biemedia.servlet.MailEx I'd say you don't have the MailEx class on the same path as ActiveMQ. I suspect it's not good enough to have it inside the webapp because the activemq listener probably runs with only the jboss-system-classpath. Did you try to put the JAR containing MailEx inside common/lib or server/lib? --Mario
Re: does ActiveMQ work within VM under z/9 (WAS6.1 MQ6.0)
We successfully use ActiveMQ on the Unix partition of the z/9. We only run the client part there (the broker runs on a x86-linux box), but I'd think that the server has any issues running. You cannot use the MQ queues directly in ActiveMQ, but you can setup a bridge to transfer the messages. Of course things always get a bit ugly when RACF and z/9 is involved :) --Mario On Wed, Nov 19, 2008 at 11:41 AM, gregorp [EMAIL PROTECTED] wrote: Hi, our company has just started to migrate and start to use VM on which Linux distros run on z/9 mainframe from IBM. On this mainframe, WAS6.1 is currently runinng with MQ6.0. Since we're trying to migrate even more applications from RACF, i didn't found out, if ActiveMQ would or could actually work with current queues created with MQ6.0 that could possibly be ported to Linux running on VM. Thank you for your answer! -- View this message in context: http://www.nabble.com/does-ActiveMQ-work-within-VM-under-z-9-%28WAS6.1---MQ6.0%29-tp20577262p20577262.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Configuration for Production
I consider the 100gb memory limits a bit excessive.. I don't know your production system, but if you get 100gb memory per queue I absolutely want to own it :) This values refer to available RAM, I think something like 20mb should be enough for most purposes. Depending on the environment you're deploying into I'd password-protect the openwire connector. I'd make JMX accessible, protected with a ssl-certificate or username/password. I'll be really valuable for debugging. Are you sure you want to run an in-broker webconsole? I'd never do that on a production system, since it i.e. shares the memory with your broker. So when the webapp goes OOM your broker is gone as well. I'd deploy it into a dedicated webserver (tomcat, jetty) --Mario On Sat, Sep 13, 2008 at 9:28 PM, Jigar Naik [EMAIL PROTECTED] wrote: Hi, I am going live with my ActiveMQ 5.1.0, but before going live i wanted to make sure weather my activemq.xml file is fine for production release, I have uploaded the active-mq.xml file, please advice me if i need to make some additional changes in the configuration file for production environment. Thanks you for spending your valuable time, With Regards, Jigar Naik http://www.nabble.com/file/p19473882/activemq.xml activemq.xml -- View this message in context: http://www.nabble.com/ActiveMQ-Configuration-for-Production-tp19473882p19473882.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: sends/receives block during failover
Hi Vadim The sender will block until resumed means that if your broker dies (or when your broker is down) while your application calls send (or commit) then that call will just wait until your broker is back up or the slave broker has taken over. This is normally desired behavior. However it can lead to applications waiting forever, so to deal with that you can set timeouts or add the TransportListener. I see you're using AMQ-5.1.0 and transacted sessions. I've had problems with that (AMQ-1710 and AMQ-1925), it does not work consistently with this version. The consumer will mostly throw an exception (as seen im AMQ-1710). However your behavior seems a but different, can you create a jira-issue and attach your test-case? I'd like to try in on my patched version and see what happens. --Mario On Wed, Sep 10, 2008 at 11:51 PM, vadimos [EMAIL PROTECTED] wrote: Below is the output from a unit test I wrote to demonstrate the problem. here is the summary from what is highlighted: 14:34:28 - send Hello, World! 14:34:29 - receive Hello, World! 14:34:34 - remind myself to shutdown master broker, i.e. localhost:61626 14:34:40 - amq detects transport failure on master 14:34:51 - amq reconnects to slave, i.e. localhost:61616. Also 2 onCommand() invocations 14:35:04 - send Hello, World! 14:35:34 - shutdown because I gave up on waiting to receive. What is going on after 14:34:51? no continuous onCommand() invocations nor ability to receive the second message! thanks, vadim 14:34:27 INFO org.springframework.test.context.TestContextManager @TestExecutionListeners is not present for class [class vadim.sample.jms.activemq.JobSenderTest]: using defaults. 14:34:27 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader Loading XML bean definitions from class path resource [applicationContext.xml] 14:34:27 INFO org.springframework.context.support.GenericApplicationContext Refreshing [EMAIL PROTECTED]: display name [EMAIL PROTECTED]; startup date [Wed Sep 10 14:34:27 PDT 2008]; root of context hierarchy 14:34:27 INFO org.springframework.context.support.GenericApplicationContext Bean factory for application context [EMAIL PROTECTED]: [EMAIL PROTECTED] 14:34:27 INFO org.springframework.beans.factory.support.DefaultListableBeanFactory Pre-instantiating singletons in [EMAIL PROTECTED]: defining beans [jmsExceptionListener,jmsPrefetchPolicy,jmsRedeliveryPolicy,activeMQConnectionFactory,activeMQPooledConnectionFactory,jmsTemplate,destination,listenerContainer,messageListener,jobReceiver,jobSender,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor]; root of factory hierarchy 14:34:28 INFO vadim.sample.jms.activemq.ActiveMQTransportListener transportResumed is called 14:34:28 INFO org.apache.activemq.transport.failover.FailoverTransport Successfully connected to tcp://localhost:61626 14:34:28 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:28 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:28 INFO vadim.sample.jms.activemq.JobSender Sending message: Hello, World! 14:34:28 INFO org.springframework.jms.connection.SingleConnectionFactory Established shared JMS Connection: PooledConnection { [EMAIL PROTECTED] } 14:34:28 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:28 INFO vadim.sample.jms.activemq.ActiveMQTransportListener transportResumed is called 14:34:28 INFO org.apache.activemq.transport.failover.FailoverTransport Successfully connected to tcp://localhost:61626 14:34:28 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:29 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:29 INFO vadim.sample.jms.activemq.JobReceiver Received message: Hello, World! 14:34:30 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:31 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:32 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:33 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:34 INFO vadim.sample.jms.activemq.JobSenderTest Shutdown master broker!!! 14:34:34 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:35 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:36 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:37 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:38 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called 14:34:39 INFO vadim.sample.jms.activemq.ActiveMQTransportListener onCommand is called
Re: Producer stops producing messages after producing 1542 messages.
I'd say you run out of memory on the broker due to a memory leak in the connection handling, every closed connection leaves a thread open and still hogs some memory. You can check that with jConsole. Can you try reusing or pooling the connections? There's a PooledConnectionFactory that does this. It's advisable to do this anyway as the constant open/close of connection uses a lot of system resources and slows down your producer quite a bit. --Mario On Sat, Aug 30, 2008 at 11:15 AM, Jigar Naik [EMAIL PROTECTED] wrote: hi i am facing problem with producer, My producer stops producing messages after producing 1542 messages on active mq bellow is my output after running producer thread OUTPUT Message Sent : Hello This is a text message on active MQ : 1542 Exception in thread ActiveMQ Transport: tcp://localhost/127.0.0.1:61616 java.lang.OutOfMemoryError: Java heap space Exception in thread InactivityMonitor ReadCheck java.lang.OutOfMemoryError: Java heap space What could be the possible reason for this error.. bellow is my producer code... Producer.java - package org.icrm; import javax.jms.Connection; import javax.jms.DeliveryMode; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; public class Producer { private MessageProducer producer; ActiveMQConnectionFactory connectionFactory; Connection connection; Session session; Destination destination; public static void main(String[] args) { Producer p = new Producer(); for(int i=0;i10;i++){ p.sendMessageToActiveMQ(Hello This is a text message on active MQ : + i, TestQueue); } } /** * Send Message to ActiveMQ * @param message * @param queueName */ public void sendMessageToActiveMQ(String message,String queueName){ try { connectionFactory = new ActiveMQConnectionFactory(tcp://localhost:61616); connection = connectionFactory.createConnection(); connection.start(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); destination = session.createQueue(queueName); this.producer = session.createProducer(destination); this.producer.setDeliveryMode(DeliveryMode.PERSISTENT); TextMessage textMessage = session.createTextMessage(); textMessage.setText(message); this.producer.send(textMessage); System.out.println(Message Sent : + message); } catch (JMSException e) { e.printStackTrace(); } catch (Exception e){ e.printStackTrace(); }finally{ producer= null; connectionFactory = null; connection = null; session = null; destination = null; } } } -- View this message in context: http://www.nabble.com/Producer-stops-producing-messages-after-producing-1542-messages.-tp19231685p19231685.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ + NMS = Stalled Message Queues
I've seen the same behaviour today with an ActiveMQ 5.1.0 (JDBC-only storage) and Java consumers (transactional). The cause in my case was the AMQ-1838 bug which resulted in a huge number of messages being paged in and the fetcher from the queue had it's AtomicLong-lastMessageId set to a number slightly bigger than the max. id of messages for that queue in the database. I'm not sure why that happened, I suspect it just read over the messages and after running out of memory it just started to discard them in the page-in (not in the database, a broker restart did always fix the problem). So I just applied the patch attached to AMQ-1838 and I could receive 1 Mio. messages without any trouble. The fastest way to see whether you run into the same issue is to look at the memory consumed by ActiveMQ during the message consumption. Without the bug (aka with the patch) it stays flat, with the bug it would grow fast to the configured memory limit. --Mario On Fri, Aug 29, 2008 at 5:01 PM, Bryan Murphy [EMAIL PROTECTED] wrote: More information... There were ~ 4,000 messages still pending in the queue. I took a closer look at the two active consumers under jconsole, the consumer that was running had approximately 800 messages in it's MessageCountAwaitingAcknowledge, the consumer that was idle had 0. I put a few new messages into the message queue, and this caused the idle process to unblock and start processing messages. Whatever this did, it unstuck the idle process and I now have significantly less than 4,000 messages and it's continuing to tick downwards. It's pretty clear that ActiveMQ decided to stop sending messages to my consumer.
Re: How can i connect to JMX beans of activemq from the code
The correct MBean name is: org.apache.activemq:BrokerName=name,Type=Broker The jconsole (at least with Java 6) displays the object name of any MBean. Also it might be worth to look at the activemq_web project which provides a layer to access the broker over jmx (query queues etc). This is then used for the activemq webconsole. Mario On Wed, Jun 25, 2008 at 2:16 PM, Michal Singer [EMAIL PROTECTED] wrote: hi. i am trying to monitor actimve jmx beans from inside the code. I am trying something like connecting to the JMX server the process uses with accessing a bean with name: org.apache.activemq.broker name:type=Broker but i get exception: com.expand.expandview.common.exceptions.EVJMXException: javax.management.InstanceNotFoundException: org.apache.activemq.embeddedbroker:type=Broker Any ideas how to connect? which object name to use? Thanks, Michal -- View this message in context: http://www.nabble.com/How-can-i-connect-to-JMX-beans-of-activemq-from-the-code-tp18111006p18111006.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: AMQ 5.1 - How to get a list of Queues
If you really want to create and list queues you could use the JMX-interface to the broker and call the addQueue method on the Broker-MBean. That does create an empty queue. Mario On Wed, Jun 25, 2008 at 3:20 PM, James Strachan [EMAIL PROTECTED] wrote: 2008/5/8 shaf [EMAIL PROTECTED]: Thanks guys, so when I try to create a Queue using the following: ActiveMQSession session = this.con.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE); // create queue Queue request = session.createQueue( name ); System.out.println(The queue has been created: + request.getQueueName() ); Thread.sleep( 3000 ); An then I try to list the queues in the previous code snippet, it does not show up. When I try using the admin console, I still dont see the queue that I created! Is there something wrong or is this a bug?? No this is not a bug - please read http://activemq.apache.org/how-do-i-create-new-destinations.html -- James --- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com
Re: Purging non-persistent topic messages more eagerly.
I think the problem might be the default Subscription Recovery Policy in ActiveMQ 4.1.1 (support for retroactive consumers). See https://issues.apache.org/activemq/browse/AMQ-1321 for the problem and http://activemq.apache.org/subscription-recovery-policy.html for more information. I'd probably set the policy to noSubscriptionRecoveryPolicy/. Mario On Tue, Jun 24, 2008 at 8:36 PM, Edwin Babadaglian [EMAIL PROTECTED] wrote: Greetings! How would an ActiveMQ 4.1.1 installation need to be configured so that non-persistent messages to non-durable topic subscribers are purged more eagerly? My JMS applications are transferring files, using ~1MB sized messages, and it appears that jconsole reveals 50 messages being left behind completing a 50MB file. Also, jmap reports a byte-array accumulation of about 80MB at this point. When I remove the topic with jconsole, the heap usage returns to around 10MB. The apps are transferring over auto-acknowledged sessions and the broker's at the default configuration. Thanks in advance for any help. -- View this message in context: http://www.nabble.com/Purging-non-persistent-topic-messages-more-eagerly.-tp18097270p18097270.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Regarding Web Console statistics
I'd guess that the topics with 0 received don't have any consumer, the ones with x have a single consumer and the ones with 2x have two consumers registered. The two consumers both receive the message, so two messages are received. Mario On Tue, Jun 24, 2008 at 11:28 PM, Badri [EMAIL PROTECTED] wrote: Hi When I view the Web console, I see for some topics, Messages Sent and Messages Received are equal. In some topics, Messages Sent show 2752 Messages Received as 0. For some topics, I see Messages Received double the value of Messages Sent. Is it a bug? Can someone let me know what is the exact interpretation? Thanks Badri -- View this message in context: http://www.nabble.com/Regarding-Web-Console-statistics-tp18100450p18100450.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Database connection between ActiveMQ and broker
Hi Depending on the JDBC driver you can have the driver to auto-reconnect (I think jTDS supports that). However there's a catch in that: The broker looses the lock on the master/slave table, so you'll end up with both being the master (if you use jdbc-master/slave). I didn't check that with the newest version, I think there was some change to the locking in regards of refreshing the lock (http://issues.apache.org/activemq/browse/AMQ-1591). There's also the https://issues.apache.org/activemq/browse/AMQ-1350 issue that is about the behaviour when encountering an unexpected loss of the lock. Mario On Thu, Jun 5, 2008 at 11:28 PM, jaya_srini [EMAIL PROTECTED] wrote: Hi Hiram We are noticing that after any SQL Server restart or network blip between ActiveMQ and the database, after the connection or the database comes back online activeMQ broker needs to be restarted as well i.e it doesn't automatically re-establish connection to the database as result any message send fails because the broker is still using the stale connection to the database. Is this designed behaviour or a bug? we are using ActiveMQ 5.0.0 and the latest version of the JSQLConnect database driver: version 5.7. The database we are using is MS SQL Server 2005 Right now, in our production environment any time we have network maintenance or database restart we also have to restart the ActiveMQ broker which is not a good option for us. thanks jaya Hiram Chirino wrote: you will have to ask your DB driver supplier to explain the com.jnetdirect.jsql.x: DBComms.transmit exception:[java.net.SocketException error in more detail. As far as having to restart the broker for that specific error, it would be a no, because the the clean up task is periodic and can handle failing everyone in a while. It will just pickup cleaning where it left off the next time it runs. If it fails every time, the old acked messages are not going to get propertly deleted out of your database. On Mon, May 19, 2008 at 11:49 AM, jaya_srini [EMAIL PROTECTED] wrote: Hello We are using ActiveMQ 5.0.0 and the JDBCPersistenceAdapter. From time to time we see the following message in the logs [Q Cleanup Timer] WARN JDBCPersistenceAdapter - Old message cleanup failed due to: com.jnetdirect.jsql.x: DBComms.transmit exception:[java.net.SocketException: Connection reset by peer: socket write error] context:[(3) [Thread[ActiveMQ Cleanup Timer,5,main], IO:caedd, Dbc:3941]]] Does this mean there is a network blip between the box that has the broker and the box that has the database and the broker can't connect to the database? Or does this happen in other circumstances i.e when a specific number of messages have been stored in DB or some other reason? We are using SQLServer 2005 thanks jaya -- View this message in context: http://www.nabble.com/Database-connection-between-ActiveMQ-and-broker-tp17321330s2354p17321330.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- Regards, Hiram Blog: http://hiramchirino.com Open Source SOA http://open.iona.com -- View this message in context: http://www.nabble.com/Database-connection-between-ActiveMQ-and-broker-tp17321330s2354p17679919.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: queue connecting to wrong broker.
Your problem might be that the two brokers are in a network of brokers due to this line networkConnector uri=multicast://default/ in the configuration (discovery via multicast). However your config for broker B shouldn't do multicast discovery, but still.. Else you'll need to use jms/QueueConnectionFactory for all operations related to Queue one. I'd probably use speaking names for the two ConnectionFactories in JNDI (like jms/RemoteCF and jms/LocalCF). Mario On Fri, Apr 4, 2008 at 7:51 PM, dknig1b [EMAIL PROTECTED] wrote: I have a set up where I have 3 servers and 2 brokers: Server A: running an embedded broker (BrokerA) on localhost:61616 providing a message Queue called QueueOne Server B: subscribes to QueueOne on localhost:61616 has an embedded broker (BrokerB) producing a topic TopicOne on localhost 61617 Server C: subscribes to topic T1. As I have things set up, when I start server B, the queue connects to the broker on Server even though I'm telling it to connect to localhost:61617. Without the broker on Server B, the queue subscriber on Server B connects to the broker on Server A, however the minute I include the broker on Server B, and restart, the Queue connects to brokerB instead of BrokerA.
Re: javax.jms.IllegalStateException: The producer is closed
Did you close the session associated with the consumer? Mario On 3/6/08, sparky2708 [EMAIL PROTECTED] wrote: Periodically I have the following error. (I don't close the producer anywhere in my code) Any ideas why? javax.jms.IllegalStateException: The producer is closed
Re: Thread pooling in ActiveMQ 5 cms
I don't know if it applies to your problem but you could setup a Camel routing on the broker so that the 10'000 queues are forwarded into a few, so that each client would only have to listen to 10 or so queues (like one per broker). Mario On 2/19/08, Ben Chobot [EMAIL PROTECTED] wrote: Hey everybody. I'm playing around with the CMS client for ActiveMQ 5, and I'm having some threading issues. It seems that every time I start a session, I get a new thread to handle that session. Clearly, this won't scale to lots of sessions, and in fact my OS won't let me create more than 300 threads. I'm wondering if there's any way to get around this? Can a single session asynchronously listen to more than one destination? Even better, it looks like the CMS client has code for thread pools in it, but C++ isn't my strong suite and it's not clear to me how I would use it Any suggestions? (As an aside, we're trying to figure out how reasonable it will be to have a single client listen to 10,000 mostly-inactive queues, probably mostly on separate brokers. Is that just flat-out not going to happen?)
Re: Start/Stop Consumer and duplicate message is received.
I'd say your problem is due to the session running in auto-ack mode (so after the onMessage method completes) and your manual ack. I think ActiveMQ might just ignore your call to acknowledge() and wait for the method to complete. Since the 5 second sleep is inside the onMessage-method it'll assume that the last message was not delivered successfully and tries to redeliver it. Try if a change to manual-ack helps. Mario On 2/11/08, wha [EMAIL PROTECTED] wrote: Hi, I'm using the following version apache-activemq-5.1-20080208.142256-20.zip I have like 500 messages pending in the broker and I have the following consumer: public void run() { //Create a connection Connection conn = null; String user = null; String passw = null; String brokerurl = tcp://localhost:61616; try { ActiveMQConnectionFactory connFactory = new ActiveMQConnectionFactory(user,passw,brokerurl); conn = connFactory.createConnection(); conn.start(); Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); Queue dest = session.createQueue(Q1); MessageConsumer msgConsumer = session.createConsumer(dest); msgConsumer.setMessageListener(this); System.out.println(Listening Q1...); } catch (JMSException jmse) { System.out.println(jmse); } } public void onMessage(Message mess) { try { DateFormat dateFormat = new SimpleDateFormat(-MM-dd HH:mm:ss); java.util.Date date = new java.util.Date(); System.out.println(dateFormat.format(date) + - Received msg: + ((TextMessage)mess).getText()); mess.acknowledge(); Thread.sleep(5 * 1000); } catch(InterruptedException ie) { System.out.println(ie); } catch (JMSException jmse) { System.out.println(jmse); } } When I stop the consumer and then restart it. The last message that was received is being resent again by the broker. Is that normal behavior or is there something wrong with my code?? Could it be my Thread.sleep that is executed too fast before an aknowledgement can be sent ? Any help appreciated! Thanks! -- View this message in context: http://www.nabble.com/Start-Stop-Consumer-and-duplicate-message-is-received.-tp15422289s2354p15422289.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Old unexpired messages not delivered; new messages are
Hi We once had the same issue (also with 4.1.1) and then discovered that the messages were assigned to some consumer that basically crashed but was still connected to the broker. Since 1000 messages is the default prefetch size for a queue this might also be your problem. In JMX you can see the consumers consuming from a certain queue (though it's a bit of work to find out) and then you can just restart this one instead of the whole broker. Possibly you don't even need to do this since you know all the consumers anyway.. so my advice is to check for 'crashed' consumers and restart them (or have the broker disconnect them). Mario On 2/8/08, zagreus [EMAIL PROTECTED] wrote: Hi, We have an ActiveMQ instance (version 4.1.1) in production, exhibiting the following behaviour: There is a backlog of 1000 messages in the queue that are not being delivered. However, new messages *are* being delivered. For example: If 3 new messages are posted to the queue, we see that the queue size grows to 1003, the messages are delivered to the client, and the queue size shrinks back to 1000. Those 1000 messages just are not being delivered. I thought maybe the messages were somehow corrupted. To test this, I made a copy of the ActiveMQ data directory and ran another instance of ActiveMQ with that data. The messages flew off the queue, so that tells me there is nothing wrong with the messages themselves. I'm guessing that our ActiveMQ in production will require a restart in order to get these 1000 messages delivered. Has anyone seen this issue before? What could be causing it? Your help is urgently requested. -- View this message in context: http://www.nabble.com/Old-unexpired-messages-not-delivered--new-messages-are-tp15356503s2354p15356503.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ + Jencks Performance
I'd say it's a problem related to connection pooling (or the lack thereof). To do a simple test try replacing your ActiveMQConnectionFactory with the PooledActiveMQConnectionFactory (not sure about the name, but something along this line) Mario On 12/10/07, andriy_heikal [EMAIL PROTECTED] wrote: I'm implementing ActiveMQ in Spring environment and using Jencks for consumer as a listener. Performance for 6000 messages sent in one time is 47msg/sec... but when testing ActiveMQ with simple java class I get about 3k msg/sec. Whats the problem? can anybody help me? anyway my testing platform is notebook with dual core 1.7GHz and 1.5GB memory. Please refer to my code below.
Re: activemq username/password config in tomcat jndi
Just use the userName (uppercase N) and password property. This applies to JNDI as well as spring. Example tomcat config: Resource name=jms/ConnectionFactory auth=Container type=org.apache.activemq.ActiveMQConnectionFactory description=JMS Connection Factory factory=org.apache.activemq.jndi.JNDIReferenceFactory brokerURL=tcp://localhost:61616 userName=sudip password=verySecret useEmbeddedBroker=false/ Mario On 11/2/07, sudip [EMAIL PROTECTED] wrote: The activemq server I am using requires username and password for connection. I have setup jndi resource in tomcat for the connectionFactory. How do I provide these auth parameters via tomcat config files or spring config files?
Re: Yes, and it's an urgent problem [was Re: lock on Oracle activemq_lock table]
I think that's a reasonable scenario, Oracle will actually have trouble detecting them fast enough. I don't know if there's a setting in Oracle that would speed up the checks. MySQL and MS SQL Server detect the disconnect almost instantaneous. However this should not happen on a clean shutdown. Which version of ActiveMQ are you using? Maybe there's some problem with the shutdown in your ActiveMQ-Version. As a workaround you could turn off the db-locking. But that'll only work if your not using jdbc-master/slave and if you can make sure that only one broker is connected. The property to turn off database locking (not all database locking, but the use of the lock table) is useDatabaseLock. So you could f.e. use: persistenceAdapter jdbcPersistenceAdapter dataSource=#mysql-ds useDatabaseLock=false/ /persistenceAdapter This also works with the journaled jdbc. Mario On 10/10/07, kmoore4now [EMAIL PROTECTED] wrote: Perhaps stating the obvious... this seems to happen when there is some network instability and the connection to the database is lost. Because the connection is lost, ActiveMQ is unable to release the lock. The lock then stays on the table until Oracle is good and ready to delete it, which can be a very long time. As any FYI... it is possible for a DBA to delete the lock manually. This is very close to a show stopper for us as well. -- View this message in context: http://www.nabble.com/lock-on-Oracle-activemq_lock-table-tf4576911s2354.html#a13140350 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Newbie ActiveMQ question: Web Console and a distribution to support it?
Since Version 5 isn't released yet the downloads are found under Latest SNAPSHOTS. http://people.apache.org/repo/m2-snapshot-repository/org/apache/activemq/apache-activemq/5.0-SNAPSHOT/ and then the newest tar.gz or zip. Mario On 10/9/07, Epiphany [EMAIL PROTECTED] wrote: However, when I click and navigate to the download, there doesn't appear to be any distributions that match (ie. Active MQ 5.0).
Re: Load Balancing Question
I think you're issue is the prefetching of messages that is done by ActiveMQ. Set the prefetchSize to 1 and it should work as you expect it. See http://activemq.apache.org/what-is-the-prefetch-limit-for.html Mario On 10/2/07, Ned Wolpert [EMAIL PROTECTED] wrote: Folks- I'm trying to see how to best configure an ActiveMQ instance, but I seem to be getting stuck and can use the help. If there is a link that has the answer, or if you know the solution, please let me know. Here's the situation that is causing me grief 1) Start one queue client (ack=client) 2) Send 30 messages to the queue (client takes 10 seconds to process each message) 3) While the queue client is processing the first message, start 2 new client processors The result is only the first queue client is processing any of those first 30 messages. Only will new messages get 'round-robin' assignment. So if after starting the those next 2 clients I send another 30 messages, the first one will process a total of 40 messages, and the second two will process 10 messages each. Is there a way in the configuration of the server, client, or anything else, to better load balance the clients? I tested this behavior with 4.1.1 and 5.0 snapshot with the same outcome. Thanks! -- Virtually, Ned Wolpert http://www.codeheadsystems.com/blog/ Settle thy studies, Faustus, and begin... --Marlowe
Re: Connecting To Master
Hi If you're using ActiveMQs master-slave then a slave will never have it's transport connector up. This is archived by a database lock or file lock or by having the slave checking the master (pure master slave). See http://activemq.apache.org/masterslave.html So you can just use the failover protocol with all possible masters (in your case failover:(tcp://serverC:61616,tcp://serverB:61616)) on your serverA Mario On 9/21/07, LizNJ [EMAIL PROTECTED] wrote: I have a broker on one server (serverA) that needs to connect to a broker on a set of servers (serverB or ServerC). At any given time either B or C will be the master and the other will be slave. How can I connect my broker on A so that once it connects to the master it does not continuously attempt to reconnect to the slave until the master goes down. Liz -- View this message in context: http://www.nabble.com/Connecting-To-Master-tf4498543s2354.html#a12829694 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Master/Slave jdbc row lock can't be auto-released
This works for me. As soon as the database detects the loss of the connection it frees the lock. Tested with MySQL and SQL-Server. I didn't plug the power but instead did a kill -9 or unplugged the network cable on the master. I think this is supposed to be a feature of any database or else you'd end up with a lot of locked rows if some clients terminate ungraceful. Mario On 9/12/07, Dingwen Yuan [EMAIL PROTECTED] wrote: Hi folks, We have tested master/slave configuration with pure jdbc persistence and the db used are mysql and postgres. When we plugged out the electric cable of the master machine, the row lock on the table ACTIVEMQ_LOCK cannot be released. So later neither of the machines can get the lock and become the master? Is the a known problem? Does any database support row lock auto release? Thanks Dingwen Yuan
Re: ActiveMQ and Linux NFS
You can specify your own jdbc adapter class (see http://activemq.apache.org/jdbc-support.html). What I'd do is write a mysql adapter (extend the mysql one) and override the locking statements. You can also rename the mysql adapter for AMQ 5 (or svn revision 518161/518164) into MySqlPropertLockingAdaptor (or whatever). Then you configure ActiveMQ to use this Adapter (see link above) and it should work.. in theory :) We do the same thing for a SQL-Server locking-problem that isn't fixed until 5.0. Mario On 9/5/07, jdemic [EMAIL PROTECTED] wrote: to further respond to my own posts, just tried to get mysql masterslave going and ran into this bug: http://www.nabble.com/Master-Slave-locking-with-MYSQL-is-not-working-with-4.1.1-tf3399897s2354.html#a9475786 is there any way to get redundancy working with 4.1.1?? jdemic wrote: To further complicate this, I just tested failover and the following happened: - i kill -9'd activemq on the master server. - on the slave server, activemq was still spinning on the filesystem lock as per my last email. - when i started up the master again, it started spinning on the filesystem lock and no broker was active. - deleting the data directory from the nfs mount and restarting activemq on the master allowed me to restart the master. My configurations follow. I would appreciate if someone on the activemq team could get back to me, this is the second clustering option i've now tried that didn't work. The first such issue was posted here: http://www.nabble.com/Slaving-issue-on-4.1.1-tf4255212s2354.html#a12110238 again w/o any response. thx, -jd master: beans bean class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer/ broker brokerName=localhost useJmx=false xmlns=http://activemq.org/config/1.0; persistenceAdapter journaledJDBC dataDirectory=/network/activemq/ /persistenceAdapter transportConnectors transportConnector name=openwire uri=tcp://localhost:61616 discoveryUri=multi cast://default/ /transportConnectors /broker /beans slave: beans bean class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer/ broker brokerName=slave useJmx=false xmlns=http://activemq.org/config/1.0; persistenceAdapter journaledJDBC dataDirectory=/network/activemq/ /persistenceAdapter transportConnectors transportConnector name=openwire uri=tcp://localhost:61616 discoveryUri=multi cast://default/ /transportConnectors /broker /beans jdemic wrote: Hey All, I'm attempting to setup activemq in a master/slave configuration as follows: http://activemq.apache.org/shared-file-system-master-slave.html I'm setting this up ontop of redhat es3 using the shared journal on an NFS mount. When i start the slave, the following occurs: faultPersistenceAdapterFactory - Journal i locked... waiting 10 seconds for the journal to be unlocked. This seems like the appopriate behavior (ie, the slave is spinning on the lock waiting for it to be released.) The issue is, however, that activemq exits after an hour and a half of so of attempting this. I'm not sure if the issue is due to some interaction between java and nfs locking or an issue with activemq. Curious if anyone else has experienced this. Thanks, -jd -- View this message in context: http://www.nabble.com/ActiveMQ-and-Linux-NFS-tf4384669s2354.html#a12511594 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ and Linux NFS
Hi We had the same problem with NFS, I think it's an NFS/Java issue since there also seem to be problems with other applications. But someone told me they've it running successful with NFS, so I suppose it's NFS-implementation/version specific whether locking works or not (he ran a JVM 1.5.0_08 and RHEL 3/4 with NFS share on a NetApp SAN running NFS3). Mario On 9/5/07, jdemic [EMAIL PROTECTED] wrote: Hey All, I'm attempting to setup activemq in a master/slave configuration as follows: http://activemq.apache.org/shared-file-system-master-slave.html I'm setting this up ontop of redhat es3 using the shared journal on an NFS mount. When i start the slave, the following occurs: faultPersistenceAdapterFactory - Journal i locked... waiting 10 seconds for the journal to be unlocked. This seems like the appopriate behavior (ie, the slave is spinning on the lock waiting for it to be released.) The issue is, however, that activemq exits after an hour and a half of so of attempting this. I'm not sure if the issue is due to some interaction between java and nfs locking or an issue with activemq. Curious if anyone else has experienced this. Thanks, -jd -- View this message in context: http://www.nabble.com/ActiveMQ-and-Linux-NFS-tf4384669s2354.html#a12499985 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: two instances of web amq - one webconsole
If the console starts up an own ActiveMQ instance then you most likely forgot to set -Dwebconsole.type=properties The webconsole supports multiple types of configuration and the type is specified via a system property. For every type there's an own spring configuration file inside the webconsole (f.e. webconsole-properties.xml) and the system property tells it which one to use. Else your settings are looking good to me. Mario On 8/28/07, den!s [EMAIL PROTECTED] wrote: Mario Siegenthaler-2 wrote: Only if the two are a master/slave pair (only one running at a time). This is what i'm using : master/slave with Shared File system. But I realize that my main problem is (and was from the beginning) that when I deploy the console(4.1.1), it start a queue (i can configure it in WEB-INF/activemq.xml). Is it possible no to start this queue and to connect to the two queue with those params : -Dwebconsole.jms.url=failover:(tcp://serverA:61616,tcp://serverB:61616) -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://serverA:1099/jmxrmi,service:jmx:rmi:///jndi/rmi://serverB:1099/jmxrmi ? -- View this message in context: http://www.nabble.com/two-instances-of-web-amq---one-webconsole-tf4317706s2354.html#a12364752 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Questions regarding AMQ (AJAX and AjaxServlet)
On 8/24/07, JohnFish [EMAIL PROTECTED] wrote: The question now is can I have a message producer in openjms and use the ajax functionality of ActiveMQ to consume these messages? Thanks in advance. I think you'll have to setup a JMS bridge with active-mq to get the messages from openjms into activemq. See http://activemq.apache.org/jms-to-jms-bridge.html You could also try to modify the ajax servlet so it reads directly from your openjms, I don't think it's got any parts in it that won't work with any jms provider. However you'll have to do some modifications (WebClient doesn't support other jms system, I think this is the point I'd start with) Mario
JMSXGroupID and un-acked-messages
hi guys What's the expected behavior with messages that are not ack'ed (for example because the MessageListener throws an exception or the transaction is rolled back) and have a JMSXGroupID set? Say we've two messages A and B that belong to the same message group. 1) Processing of A fails. The consumer runs out of messages (until a call to recover) and enters a wait state. 2) Processing of A fails. The consumer receives B. The consumer is restarted or recover is called and it received A. This violates the message ordering within the message group! 3) Something I didn't think of :) The reason I'm asking is that we need to be absolutely sure that the message processing within one message group occurs strictly in the correct order, even if some messages have to be processed twice. Thanks Mario
Re: Problem using ActiveMQ
If there are no exception thrown (I think you changed the sample code to actually do something with the catched exceptions) and the code is actually executed then the message must've been sent. How do you check for the message? Does the session never be created imply that the execution just stops on the Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE) line? Mario On 8/9/07, denez [EMAIL PROTECTED] wrote: Hi Mario, First, thanks for your reply. I just try to run the so simple example that is in the website that i mentionned. After, if it's possible i will try to embedded the activeMQ to Tomcat. But for the moment, the session never be created but i have a connection. I can't understand what happend because there is no exception throw !! Could you help me again ? Thanks in advance, Regards, denez Mario Siegenthaler-2 wrote: I think you're supposed to call connection.start() as soon as you're application thinks it fitting, connections don't come started (and I'd hate it if they did). By documentation you can create session on stopped connections you just won't receive any messages (not even sure if you could send some messages, but I think you can). Not sure if I understood you correctly.. Mario On 8/8/07, denez [EMAIL PROTECTED] wrote: Hi all, i just try to user ActiveMQ under Tomcat 5.5 I follow instruction in the link below : http://activemq.apache.org/setting-up-activemq-with-tomcat-559.html http://activemq.apache.org/setting-up-activemq-with-tomcat-559.html but without any success for the moment i hope. When i debug i've got the connection but with parameter started=false ! So when i try to get a session nothing append. No error, no shutdown of tomcat. Can someone help me to deal with this problem. Thanks in advance. Regards, Denez -- View this message in context: http://www.nabble.com/Problem-using-ActiveMQ-tf4237284s2354.html#a12055977 Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Problem-using-ActiveMQ-tf4237284s2354.html#a12067742 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: web console in 4.1.1
On 8/9/07, keneida [EMAIL PROTECTED] wrote: is it possible to set persistance to oracle in web console's emedded broker? when i try to do it i get: Yes it's possible, you can change the activemq.xml in the WEB-INF of the war to whatever configuration you like. Exception processing TLD META-INF/sitemesh-page.tld in JAR at resource path /opt/tomcat6/webapps/activemq-web-console/WEB-INF/lib/sitemesh-2.2.1.jar Does the configuration work in a standalone broker? I'd wait integrating oracle into the webconsole until you've got oracle running in a standalone broker and a working web-console with an embedded broker in the standard configuration. The exception you get doesn't seem oracle related to me. Mario
Re: Persistence Adaptor MBean
The default JDBCPersistenceAdapter has access to the BrokerService. The broker service exposes the ManagementContext that contains a getMBeanServer-method. So you get easy access to the MBean-Server. Just register your JMX-Bean there. Example: // just to illustrate.. MyPersistenceAdapter adapter = this; MyPersietenceAdapterMBean view = this; // or make a new MPAView() MBeanServer mbeanServer = brokerService.getManagementContext().getMBeanServer(); if (mbeanServer != null) { ObjectName objectName = new ObjectName(managementContext.getJmxDomainName() + : + BrokerName= + JMXSupport.encodeObjectNamePart(getBrokerName()) + , + Type=ProxyConnector, + ProxyConnectorName= + JMXSupport.encodeObjectNamePart(connector.getName())); mbeanServer.registerMBean(view, objectName); } Mario On 8/9/07, Anthrope [EMAIL PROTECTED] wrote: Hello, I have a custom persistence adaptor that uses Berkeley DB, and would like to expose the message store as an MBean, since I am collecting stats like average message size, etc. and would rather have those queried via JMX than to log them to log4j. Any idea how I could expose either the persistence adaptor or message store objects as MBeans? Thanks, Prashanth -- View this message in context: http://www.nabble.com/Persistence-Adaptor-MBean-tf4244154s2354.html#a12077446 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Messages getting stuck in network of brokers configuration, Kaha.
Yes, this is very annoying in some situations where you depend onto this numbers. How hard / expensive (performance wise) would it be to add an configuration flag so the numbers are actually fetched from the message store instead of 'just' being the difference of (messages sent)-(messages consumed)? I think with a JDBC based persistence (no journal) this should be doable with minimal costs. Journals and Kaha stores could darken the picture, but I've no insight there. We'll need to do some more monitoring of our queue in production to ensure that all the messages (in our case business events such as Mr. X is now married to Ms. Y) are dispatched to and consumed by the various systems connected to our ActiveMQ-Message Bus. So until we're given an option to let activemq show 'effective' queue length the monitoring is kinda tricky. I don't really want to explain to the customer how it comes that the 'marriage-queue' has -20 messages in it.. sounds like that stupid joke where 5 people have to board the bus in order for the bus to become empty. Mario On 8/7/07, Tom Samplonius [EMAIL PROTECTED] wrote: - eta [EMAIL PROTECTED] wrote: ... I decided to start restart both brokers all clients. After doing so, I'm now looking at my QueueSize in broker #1 and it's showing -1000 messages! ... This sounds like a known bug in ActiveMQ: ActiveMQ is unable to determine the number of messages in the persistence store upon startup, so all counters start at zero. If you had a 1000 messages in the store upon startup, and then consumed them, it is normal for ActiveMQ to say the queue now has -1000 messages in it. Tom
Re: web console in 4.1.1
Hm, that's supposed to work, although I would create a webconsole-custom.xml instead of changing the webconsole-properties.xml, but that's minor. We're running a configuration that's almost the same as yours and its running just fine. Can you provide some more details about how you start it? Do you use the mvn jetty or deploy it into a tomcat or a jboss? What I guess as the cause is some classpath mixup, maybe you've got a second spring in it? Mario On 8/8/07, keneida [EMAIL PROTECTED] wrote: I compiled activeqm with maven. Now i have the activemq-web-console.war. I want to create simple war where u only need to change one config file to get it connected. I added activemq.jar changed webconsole-default.xml and puted [code]import resource=webconsole-properties.xml/[/code] there in webconsole-properties.xml i eddited [code] bean id=sessionPool class=org.apache.activemq.web.SessionPool property name=connectionFactory ref=connectionFactory/ /bean bean id=brokerQuery class=org.apache.activemq.web.RemoteJMXBrokerFacade autowire=constructor destroy-method=shutdown property name=jmxUrl value=service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/ property name=brokerNamenull//property /bean bean id=connectionFactory class=org.apache.activemq.ActiveMQConnectionFactory property name=brokerURL value=tcp://localhost:61616/ [/code] but it does not want to start. the error is: [code] org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Unable to create namespace handler for: v2c Caused by: java.lang.IllegalStateException: Unable to create namespace handler for: v2c [/code] If thats wrong attempt how i can do it? -- View this message in context: http://www.nabble.com/web-console-in-4.1.1-tf4237121s2354.html#a12055637 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Problem using ActiveMQ
I think you're supposed to call connection.start() as soon as you're application thinks it fitting, connections don't come started (and I'd hate it if they did). By documentation you can create session on stopped connections you just won't receive any messages (not even sure if you could send some messages, but I think you can). Not sure if I understood you correctly.. Mario On 8/8/07, denez [EMAIL PROTECTED] wrote: Hi all, i just try to user ActiveMQ under Tomcat 5.5 I follow instruction in the link below : http://activemq.apache.org/setting-up-activemq-with-tomcat-559.html http://activemq.apache.org/setting-up-activemq-with-tomcat-559.html but without any success for the moment i hope. When i debug i've got the connection but with parameter started=false ! So when i try to get a session nothing append. No error, no shutdown of tomcat. Can someone help me to deal with this problem. Thanks in advance. Regards, Denez -- View this message in context: http://www.nabble.com/Problem-using-ActiveMQ-tf4237284s2354.html#a12055977 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Synchronous Are you there? using JMS
Just a thought, but why don't you use a topic for this? I think a queue will cause problems because the message will be stored. So the I'm here thing would possibly refer to an older question and would no longer be relevant. Hm, just reread your question, and realized that you directly want to process the clients ack. I don't think that'll work. How'd you receive the ack? Maybe a possiblity would be to define a max queue/topic-buffer size of 1 and then the send would block until the message is received. Another way would be to actually send a response and the asker would just wait for a different message on a temporary queue/topic. There's some utility in the JMS-API to do that.. sadly I can never it's name. Mario On 8/3/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have two entities on either side of a queue. Entity A needs to do a synchronous are you there? on the queue and receive a response synchronously from Entity B. I thought I'd do this: - Define a Queue Are you there and dispatchAsync = false - create a session with CLIENT_ACK set - send are you there message to the queue The receiver would acknowledge the message in the onMessage() method. However, I would like for the sender to time out if the ack is not received within a specified time. I see no option to do this which is obvious. How do I make sure that a synchronous send times out if the response is not received within a specified interval? Regards /U
Re: web console AMQ 4.1.1
Yes it's possible, we use it in a production environment with ActiveMQ 4.1.1 Just follow the description on http://activemq.apache.org/web-console.html under Starting the Web Console in a seperate VM/in a Web-Container Mario On 7/25/07, kpetrov [EMAIL PROTECTED] wrote: Since 5.0 is not released, is it possible to use web console of 5.0-SNAPSHOT to monitor 4.1.1 broker? Are there any estimates for 5.0 release? -- View this message in context: http://www.nabble.com/web-console-AMQ-4.1.1-tf4147464s2354.html#a11798573 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: access to embedded broker
I don't know why your derby failed to start. Reasons I can think of are: * non-writeable directory where activemq tries to create the derby data-directory. I'd check the directory you start tomcat from and the tomcat directory itself. * some missing classes for derby, althought the derbydb is included in the amq-jar, so that shouldn't happen Could you include the complete log that's produced during the tomcat startup? You could also try to configure your broker with an activemq.xml (vm://localhost?brokerConfig=xbean:activemq.xml) and then specify an explicit data directory in the xml. Mario On 6/29/07, Suchitha Koneru (sukoneru) [EMAIL PROTECTED] wrote: I did a netstat at the command prompt and I got the following output TCPsukoneru-wxp:61716 sukoneru-wxp.amer.cisco.com:0 LISTENING There by clearly, the broker has started , but derby db did not start due to which a connection cannot be established to the broker. The following exception was also raised in regard to derby db at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnecti on.java) at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection. java) at org.apache.derby.impl.jdbc.EmbedConnection.init(EmbedConnection.java) at org.apache.derby.impl.jdbc.EmbedConnection20.init(EmbedConnection20.ja va) at org.apache.derby.impl.jdbc.EmbedConnection30.init(EmbedConnection30.ja va) at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java) at org.apache.derby.jdbc.Driver169.connect(Driver169.java) at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSourc e.java) at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSourc e.java) So is this a known error or am I missing something in the configuration. The derby DB did not start , when I tried to use an embedded broker. Please let me know, Thank you, Suchitha. -Original Message- From: Suchitha Koneru (sukoneru) Sent: Thursday, June 28, 2007 6:03 PM To: users@activemq.apache.org Subject: RE: access to embedded broker Thank you so much Mario for the link. I tried to use an embedded broker with tcp connector. An Exception was raised stating that Could not connect to broker URL: vm:(broker:(tcp://localhost:61716)). Reason: java.io.IOException: Failed to start database 'derbydb', see the next exception for details. org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport. java:32) org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(A ctiveMQConnectionFactory.java:252) org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(A ctiveMQConnectionFactory.java:211) org.apache.activemq.ActiveMQConnectionFactory.createTopicConnection(Acti veMQConnectionFactory.java:188) com.cisco.cpnm.common.messaging.jms.JmsEventSender.getConn(JmsEventSende r.java:249) The Context.xml has Active MQ connection Factory defined as follows Resource name=jms/ConnectionFactory auth=Container type=org.apache.activemq.ActiveMQConnectionFactory description=JMS Connection Factory factory=org.apache.activemq.jndi.JNDIReferenceFactory brokerURL=vm:(broker:(tcp://localhost:61716)) brokerName=LocalActiveMQBroker useEmbeddedBroker=true / The code for creating the Topic Connection is as follows : private TopicConnection getConn() { TopicConnectionFactory Herbiefactory = null; javax.jms.TopicConnection HerbieTopic=null; try{ Herbiefactory = (TopicConnectionFactory)envContext.lookup(jms/ConnectionFactory); // TopicConnection for subscribing and receiving events HerbieTopic = Herbiefactory.createTopicConnection(); // exception occurs at this line, I think the Herbie Factory is null , and hence the exception } catch(Exception e){ logger.error(error in creating topic ocnnection method +e.getMessage()); } return HerbieTopic; } I am not using activemq.xml , I would like mention all the broker related configuration in the broker URI. The context.xml is present in Tomcat/conf directory. Iam using active mq 4.0 is embedded broker supported in this version ? Any idea as to why the factory is becoming null ? Thank you, Suchitha. -Original Message- From: Mario Siegenthaler [mailto:[EMAIL PROTECTED] Sent: Thursday, June 28, 2007 2:57 PM To: users@activemq.apache.org Subject: Re: access to embedded broker Did you check the Sharing embedded broker across webapp contexts-thread (last week)? This was the exact same problem and serveral
Re: access to embedded broker
Did you check the Sharing embedded broker across webapp contexts-thread (last week)? This was the exact same problem and serveral possible solutions (at least one of them I tested personally). Easy way: put the activemq in the common/lib and just let the to webapps connect to vm://localhost. Ways you can add a tcp-Connector to this broker are described in the other thread or in the vm-tp-reference (http://activemq.apache.org/vm-transport-reference.html) Mario On 6/28/07, Suchitha Koneru (sukoneru) [EMAIL PROTECTED] wrote: I also observed that when configuring an embedded broker Tomcat automatically starts the embedded broker when vm transport is used and not for tcp transport. Thanks, Suchitha. -Original Message- From: Suchitha Koneru (sukoneru) Sent: Thursday, June 28, 2007 12:45 PM To: users@activemq.apache.org Subject: access to embedded broker Hello Active Mq users , Can an external java process get access to an embedded broker ? In our application we have Tomcat server with two Web apps , Web App A and Web app B. These two web apps exchange messages via the embedded broker. Is the embedded broker confined only to the JVM in which it is started ?? in our case the embedded broker is started within the JVM of Tomcat.Can an external java process connect to the embedded broker and sent messages to these two web apps ? This process is entirely in a different JVM . Please let me know, Based on your response I will have to decide if I have use an embedded broker with VM transport or an external broker with TCP transport. thank you so much, Suchitha.
Re: Mail queue
Somebody proposed in a different thread to use a MessageSelector to only select the messages that are at least an hour old. You could set a message-property to System.currentTimeMillis() and then create a selector with SendTime +(System.currentTimeMillis()-360). You'd have to recreate your consumer in a certain interval since unfortunatly time passes by itself :) Mario On 6/15/07, Gaurav Hariani [EMAIL PROTECTED] wrote: I would approach this using persistent messages. Your webapp creates a persistent message adds the time (as a property maybe) at which the message should be sent as email and puts it on a queue. Another application can regularly poll the queue for messages that are ready to be emailed. That way if the webapp, the application that does the mailing or the broker dies and comes back up, the messages are not lost. Gaurav Hehl, Thomas wrote: I new to JMS and messaging in general and would like a little advice. In my application, I have a java webapp that sends e-mails. For reasons too complicated to explain, my client wants an hour lag time between the time the e-mail is created and the time it is sent, so I need to park it somewhere. The problem is that I want them to be able to shutdown (or even crash) my server, re-start, then have the messages take back off again like nothing ever happened. It seemed like something activeMQ might be well suited for. Am I barking up the wrong tree? Has anyone done anything like this? Thanks. Thom Hehl Sr. eJuror Architect * Office (859) 277-8800 x 144 * [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ACS, Inc. Government Solutions 1733 Harrodsburg Road Lexington, KY 40504-3617 This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and notify sender via e-mail at [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] or by telephone at 859-277-8800 ext. 144. Thank you.
Re: Getting Stomp support to a usable state...
I've added some documentation about the webconsole and I included a section about how to password protect it (although only on jetty, but I hope the folks will figure out how to 'translate'' that to tomcat by themself :). And for the JMX-password issue there is a patch by Andrew Deason (https://issues.apache.org/activemq/browse/AMQ-1260). Mario On 6/7/07, Tom Samplonius [EMAIL PROTECTED] wrote: By all means, tell me how. Web Console can be protected with servlet security, which is fine. But I assume I'm correct, that the only way to protect JMX, is to the use the Sun JMX
Re: Shared File System Master Slave Tips?
We've tried it on NFS on linux and it didn't work (some locking issue with java and nfs). However it worked with windows shares, but we're not using it because we run linux boxes. Mario On 5/31/07, Michael Slattery [EMAIL PROTECTED] wrote: Hello List! I'm interested in putting together the Shared File System Master Slave scenario in a managed hosting setup. What are you using to achieve the shared file system master slave on your installs? I would appreciate it very much if folks on this list would share descriptions of successful environments. SAN/NAS, Filesystems, etc would be very helpful. If you are doing this in a managed hosting environment, even better!It's not easy to determine who is doing SAN with shared access or decent NAS from the vendor websites out there (rackspace and the like). Last case, if you tried Shared File System Master Slave but found that you had to go with JDBC that would also be helpful. Thank you. Mike
Re: How to manage romoter broker with activemq-web-console?
Yes that might work. If I understand it correctly you could specify on the maven command line which war to build resp. which 'version' of it to run? As you may have realized I had quite some trouble in finding a way to let the user/deployer specify which 'version' to run. The best thing I could come up with was the system-properties approach, but the maven one might actually be better. Mario On 5/25/07, James Strachan [EMAIL PROTECTED] wrote: [...] BTW I was wondering if we should try use profiles in the activemq-web-console pom.xml so folks could run in the profile of embedded (default) v remote JMX etc? No biggie as I guess folks can just customize things via maven properties.
Re: How to manage romoter broker with activemq-web-console?
Many thanks James, I realize this patch is quite bitchy to apply :) I'll try it out as soon as I'm back home. Mario On 5/24/07, James Strachan [EMAIL PROTECTED] wrote: Sorry for the delay getting back to you. Its taken me a while to get the time to apply the patch and then get everything working again :). Firstly many thanks for this great patch! I've added you to the team page as your patch is surely worthy... http://cwiki.apache.org/ACTIVEMQ/team.html I made a couple of changes. e.g. I stuck with commons-logging in the classes in activemq-web rather than the org.slf4j stuff to avoid a classloader issue I was hitting. Also I kept the current default behaviour by default, to boot up an embedded broker. (So added a webconsole-embedded.xml) which avoids the dependency on jmx or a remote/invm broker. However all the stuff you added to run invm, properties or jndi based is all there. Could you try out my application of your patch and see if things still work for you as you expected? There's a chance I've messed something up. BTW the assembly (distro) now works too; where the broker boots up an embedded jetty with the web console inside it etc -- James --- http://macstrac.blogspot.com/
Re: How to manage romoter broker with activemq-web-console?
The current subversion head does not support this, however I've written a patch allowing this. Check AMQ-1241 https://issues.apache.org/activemq/browse/AMQ-1241 for the attached patch against the current head. Greetings Mario PS: has anybody reviewed the patch? On 5/15/07, liuxiaoming [EMAIL PROTECTED] wrote: I have a running activmq on host A,how to manage it using activemq-web-console working on host B? -- View this message in context: http://www.nabble.com/How-to-manage-romoter-broker-with-activemq-web-console--tf3756933s2354.html#a10618302 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ 4.1.1 MS SQL Server 2005 ACTIVEMQ_MSGS not found
Yeah, exactly. Actually what we did was to just compile this one file (unfortunate it has some dependencies), then pack it in its own jar (like mssqladapter,jar or something) and copy it to the activemq lib directory so it gets added to the classpath. I'd be happy to send you our jar, but unfortunatly I don't have access to it at the moment as I'm attending JavaOne. But just send me an email if you'd like that jar then I'll mail it to you as soon as I get back. Mario On 5/8/07, kbd [EMAIL PROTECTED] wrote: I took a look at the posting you referred me to. It seems that I should just copy and rename that sqlserver file. Now for the stupid question. Does that mean I will need to recompile ActiveMQ? and build a new activemq.jar. kd Mario Siegenthaler wrote: You can tell ActiveMQ to use a specific database type by the following configuration: jdbcPersistenceAdapter adapterClass=org.apache.activemq.store.jdbc.adapter.ImageBasedJDBCAdaptor/ Just lookup the correct adapter for SQL-Server. If you get a database locking issue use the modified adapter by Daniel Mueller: JIRA-Issue AMQ-1210 (http://issues.apache.org/activemq/browse/AMQ-1210) Hope to Help Mario -- View this message in context: http://www.nabble.com/ActiveMQ-4.1.1---MS-SQL-Server-2005--ACTIVEMQ_MSGS--not-found-tf3694309s2354.html#a10376729 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ 4.1.1 MS SQL Server 2005 ACTIVEMQ_MSGS not found
You can tell ActiveMQ to use a specific database type by the following configuration: jdbcPersistenceAdapter adapterClass=org.apache.activemq.store.jdbc.adapter.ImageBasedJDBCAdaptor/ Just lookup the correct adapter for SQL-Server. If you get a database locking issue use the modified adapter by Daniel Mueller: JIRA-Issue AMQ-1210 (http://issues.apache.org/activemq/browse/AMQ-1210) Hope to Help Mario
Re: Network of brokers - messages not forwarded
The default value of networkTTL is 1 (per the documentation); does this mean that messages will not cross more than one broker? Could that be causing the problem above? I'd say it's the TTL that causes your problem (it actually does what you said). Try setting it at least to 2. I'd also configure the dynamicOnly to true, since otherwise the message could be passed from broker A to broker B (no consumer attached) and then later a consumer on A wouldn't be able to receive it anymore (run out of TTL). See also http://activemq.apache.org/networks-of-brokers.html esp. the configuration pitfall section. We ran into the exact same problem as you did, it gets even worse with 3 brokers... :) Sincerely Mario
Re: Web Console not working
Newbie question: I just downloaded the binarry install for activemp 4-1-1. When I go through the 'getting started' steps, I can't access the web console. the trace doesn't show any reference to a web server (shoud it be jetty ?) the http://localhost:8161/admin doesn't seem to be responding. As far as I know the WebConsole is only present in the 4.2 releases (read pre-releases).
Re: AMQ 4.1 loses every other message?
[.. broker 'losing' every 2nd message.. ] Oh I just thought of another possible cause (related to the first one): You might also startup a second broker named localhost (vm://localhost) if you have renamed you actual broker to something else and use the WebClient. There's some (IMO weird) code within the WebClient that will use vm://localhost under some conditions, which will result in a second broker beeing started. Hope it helps Mario