[jira] Commented: (AMQ-1068) DestinationMap seems to use up lots of RAM if using deep hierarchies
[ https://issues.apache.org/activemq/browse/AMQ-1068?page=comments#action_37564 ] james strachan commented on AMQ-1068: - The fix was done in r478324 on trunk if folks wanna backport DestinationMap seems to use up lots of RAM if using deep hierarchies Key: AMQ-1068 URL: https://issues.apache.org/activemq/browse/AMQ-1068 Project: ActiveMQ Issue Type: Bug Components: Broker Affects Versions: 4.1.0, 4.0.2 Reporter: james strachan Assigned To: james strachan Fix For: 4.2.0 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
communicating with Topic subscribers from custom interceptor class
Hello, Thanks for your great work on ActiveMQ! I'm writing a custom interceptor that extends BrokerFilter in order to process messages that are published to particular Topics. My question is, how can my interceptor make a direct connection with the JMS client that published the message? Does the subscriber have to manually set an identifier in order to be accessible, or are the identifiers automatically generated? Additionally, is there a way to access the list of subscribers to a particular topic and send messages to individual subscribers from a custom interceptor class? Thanks again for your work! -- J. Patrick Bedell [EMAIL PROTECTED] http://infoeng.sourceforge.net http://rothbardix.blogspot.com
Re: Message Expiry
Hi, I've tried your code. It worked. But then I substituted synch .receive() with asynch MessageListener, which I register after the same timeout. And surprise! The message arrives. But it still shouldn't, right? Let me post here my code: ConnectionFactory connectionFactory = (ConnectionFactory) ctx.lookup( ConnectionFactory ); Connection connection = connectionFactory.createConnection( ); connection.start( ); long timeToLive = 1000; Session session = connection.createSession( false, Session.AUTO_ACKNOWLEDGE ); MessageProducer producer = session.createProducer( null ); producer.setTimeToLive( timeToLive ); Queue myQueue = session.createQueue( TEST_QUEUE ); Message m = session.createTextMessage( message ); producer.send( myQueue, m ); // sleeps a second longer than the expiration time. // Basically waits till queue expires. Thread.sleep( timeToLive + 1000 ); // myQueue should return null since it already expired MessageConsumer consumer = session.createConsumer( myQueue ); // Message msg = consumer.receive( 1000 ); // System.out.println( msg ); MessageListener messageListener = new MessageListener( ) { public void onMessage(Message m) { if ( m instanceof TextMessage ) { TextMessage textMessage = (TextMessage) m; try { System.out.println( got messge: + textMessage.getText( ) ); } catch ( JMSException e ) { e.printStackTrace( ); } } } }; consumer.setMessageListener( messageListener ); Regards, Sergey Z jlim wrote: Hi, That's odd. I ran the same test case on 4.0.2 and I can't seem to reproduced the problem. Would you mind posting a snippet of your code so we could take a look at it? Btw, please make sure that the setTimeToLive method is called before sending the message. You could also try running the sample code below and see if it works for you . connection.start(); long timeToLive = 1000; MessageProducer producer = session.createProducer(null); p.setTimeToLive(timeToLive ); Queue myQueue = session.createQueue(QUEUE); Message m = session.createTextMessage(message); producer.send(myQueue, m); // sleeps a second longer than the expiration time. // Basically waits till queue expires. Thread.sleep(timeToLive + 1000); //myQueue should return null since it already expired MessageConsumer consumer = session.createConsumer(myQueue); Message msg = consumer.receive(1000); .. Regards, Jonas Sergey wrote: Hallo, I've got the same problem. Expiration dosn't seem to work. I'm using 4.0.2. jlim wrote: Hi, Hmm - which version of ActiveMQ are you using? The message should have expired and should not be consumed after the timetolive has elapsed. You can try looking on some of the test cases and see if you can reproduce the issue: ie. https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java btw, I tested this using trunk and appears to work ok :) Regards, Jonas Christopher_Ong wrote: I set the timetolive for a message as 1s and y after that period, the msg still remain there? Shouldn't be it wil automatically been deleted or send to dead msg queue? -- View this message in context: http://www.nabble.com/Message-Expiry-tf2407730.html#a7571901 Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
ActiveMQ-CPP 1.0 released
Hey everyone, We have an official release of ActiveMQ-CPP 1.0! You can go to the release page here: http://www.activemq.org/site/activemq-cpp-10-release.html . And the main ActiveMQ-CPP page has been updated as well: http://www.activemq.org/site/activemq-c-clients.html Thanks to everyone that helped get this out the door! We have already begun work on our next major release which will have support for openwire, so stay tuned! :) Regards, Nate
Re: ActiveMQ-CPP 1.0 released
On 11/27/06, Nathan Mittler [EMAIL PROTECTED] wrote: Hey everyone, We have an official release of ActiveMQ-CPP 1.0! You can go to the release page here: http://www.activemq.org/site/activemq-cpp-10-release.html . And the main ActiveMQ-CPP page has been updated as well: http://www.activemq.org/site/activemq-c-clients.html Thanks to everyone that helped get this out the door! We have already begun work on our next major release which will have support for openwire, so stay tuned! :) Nice work, guys! I'm glad to see this taking on a life of its own. Bruce -- perl -e 'print unpack(u30,D0G)[EMAIL PROTECTED]5R\F)R=6-E+G-N61ED\!G;6%I;\YC;VT* );' Apache Geronimo - http://geronimo.apache.org/ Apache ActiveMQ - http://activemq.org/ Apache ServiceMix - http://servicemix.org/ Castor - http://castor.org/
Re: Message Expiry
hi Sergey, This does look like a bug. You can monitor the progress of this issue at https://issues.apache.org/activemq/browse/AMQ-1072. Regards, Jonas Sergey wrote: Hi, I've tried your code. It worked. But then I substituted synch .receive() with asynch MessageListener, which I register after the same timeout. And surprise! The message arrives. But it still shouldn't, right? Let me post here my code: ConnectionFactory connectionFactory = (ConnectionFactory) ctx.lookup( ConnectionFactory ); Connection connection = connectionFactory.createConnection( ); connection.start( ); long timeToLive = 1000; Session session = connection.createSession( false, Session.AUTO_ACKNOWLEDGE ); MessageProducer producer = session.createProducer( null ); producer.setTimeToLive( timeToLive ); Queue myQueue = session.createQueue( TEST_QUEUE ); Message m = session.createTextMessage( message ); producer.send( myQueue, m ); // sleeps a second longer than the expiration time. // Basically waits till queue expires. Thread.sleep( timeToLive + 1000 ); // myQueue should return null since it already expired MessageConsumer consumer = session.createConsumer( myQueue ); // Message msg = consumer.receive( 1000 ); // System.out.println( msg ); MessageListener messageListener = new MessageListener( ) { public void onMessage(Message m) { if ( m instanceof TextMessage ) { TextMessage textMessage = (TextMessage) m; try { System.out.println( got messge: + textMessage.getText( ) ); } catch ( JMSException e ) { e.printStackTrace( ); } } } }; consumer.setMessageListener( messageListener ); Regards, Sergey Z jlim wrote: Hi, That's odd. I ran the same test case on 4.0.2 and I can't seem to reproduced the problem. Would you mind posting a snippet of your code so we could take a look at it? Btw, please make sure that the setTimeToLive method is called before sending the message. You could also try running the sample code below and see if it works for you . connection.start(); long timeToLive = 1000; MessageProducer producer = session.createProducer(null); p.setTimeToLive(timeToLive ); Queue myQueue = session.createQueue(QUEUE); Message m = session.createTextMessage(message); producer.send(myQueue, m); // sleeps a second longer than the expiration time. // Basically waits till queue expires. Thread.sleep(timeToLive + 1000); //myQueue should return null since it already expired MessageConsumer consumer = session.createConsumer(myQueue); Message msg = consumer.receive(1000); .. Regards, Jonas Sergey wrote: Hallo, I've got the same problem. Expiration dosn't seem to work. I'm using 4.0.2. jlim wrote: Hi, Hmm - which version of ActiveMQ are you using? The message should have expired and should not be consumed after the timetolive has elapsed. You can try looking on some of the test cases and see if you can reproduce the issue: ie. https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java btw, I tested this using trunk and appears to work ok :) Regards, Jonas Christopher_Ong wrote: I set the timetolive for a message as 1s and y after that period, the msg still remain there? Shouldn't be it wil automatically been deleted or send to dead msg queue?