[jira] [Assigned] (AMQ-3247) ensure that activemq-console command like activemq:list/activemq:query/activemq:bstat can work in servicemix container out-of-box
[ https://issues.apache.org/jira/browse/AMQ-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dejan Bosanac reassigned AMQ-3247: -- Assignee: Dejan Bosanac ensure that activemq-console command like activemq:list/activemq:query/activemq:bstat can work in servicemix container out-of-box - Key: AMQ-3247 URL: https://issues.apache.org/jira/browse/AMQ-3247 Project: ActiveMQ Issue Type: Improvement Components: JMX Affects Versions: 5.4.2 Reporter: Freeman Fang Assignee: Dejan Bosanac Attachments: AMQ-3247-new.patch, AMQ-3247.patch This issue is actually in Servicemix4 we can't use activemq-console command like activemq:list/activemq:query/activemq:bstat out-of-box with default option, more details from SMX4-784[1] [1]https://issues.apache.org/jira/browse/SMX4-784 -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3245) SELECTORS doesn't work for releases 5.4.0 to current
[ https://issues.apache.org/jira/browse/AMQ-3245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13013911#comment-13013911 ] Dejan Bosanac commented on AMQ-3245: Hi, your problem isn't related to page size but the small memory limit on the queue. Because of this small limit only portion of messages (22 to be precise) can be cached in the queue and while those messages aren't consumed others can't get in from the store. So use some higher value for memory limit and you'd be fine. SELECTORS doesn't work for releases 5.4.0 to current Key: AMQ-3245 URL: https://issues.apache.org/jira/browse/AMQ-3245 Project: ActiveMQ Issue Type: Bug Components: Selector Affects Versions: 5.4.1, 5.4.2 Reporter: Melvin Ramos Attachments: ActiveMQ_Test_Case.txt, JmsTestConsumer1.java, JmsTestProducer1.java, activemq.xml Is it possible that selector was broken due to new enhancement regarding REST selectors on 5.4.0? We are using 5.3.0 and selectors are working fine, however since we've upgraded our demo and test environments to 5.4.1 and essentially 5.4.2 it stop working for some reason. I can recreate it 100% of the time and below are the steps. 1) First create the producer with String property set to 30. i.e. test, 30: {code} String username=Me String passwd = invicible String url =failover:(tcp://localhost:51515)?maxReconnectDelay=5000useExponentialBackOff=false; ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(username, passwd, url); Connection connection = connectionFactory.createConnection(); // connection.setUseCompression(true); set this on the URL instead connection.setExceptionListener(this); String destinationString = Test.Dest; // create a session, destination, and producer Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Destination destination = session.createQueue(destinationString); MessageProducer producer = session.createProducer(destination); producer.setDeliveryMode(DeliveryMode.PERSISTENT); Message message = session.createTextMessage(This is a test message); message.setIntProperty(test, 30); // insert the message 1000 times. for (long l = 0L; l 1000; l++) { producer.send(message); } producer.close(); session.close(); connection.close(); {code} Now we have 1000 message sitting on activemq, if you navigate to http://localhost:8161/admin and view Test.Dest queue you should see the 1000 message there. 2) Create the consumer with test 50 selector. {code} public void setup() { String username=Me String passwd = invicible String url =failover:(tcp://localhost:51515)?maxReconnectDelay=5000useExponentialBackOff=false; //tcp://localhost:51515; ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(username, passwd, url); Connection connection = connectionFactory.createConnection(); // connection.setUseCompression(true); set this on the URL instead connection.setExceptionListener(this); // create a session, destination, and consumer Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE); String destinationString = Test.Dest; session.createQueue(destinationString); MessageConsumer consumer = session.createConsumer(destination, test 50); consumer.setMessageListener(this); connection.start(); } public void onMessage(Message message) { try { if (print text) { TextMessage textMessage = (TextMessage) message; System.out.println(textMessage.getText()); } catch (Exception ex) { //swallow } } {code} Once connected to broker, you'll see that it doesn't do anything as the message is not for this selector. 3) Edit the code to producer. {code} message.setIntProperty(test, 60); {code} And then rerun the producer to insert the 1000 records again. Actual: Nothing happens, the consumer just waits for any message that comes in that matches the selector. Expected: The message gets consumed, as the latter part of the producer ran matches the selector. This behavior works perfectly fine with 5.3.0. As selector is an important functionality of JMS as a whole this being broken is actually bad. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (AMQ-3247) ensure that activemq-console command like activemq:list/activemq:query/activemq:bstat can work in servicemix container out-of-box
[ https://issues.apache.org/jira/browse/AMQ-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dejan Bosanac resolved AMQ-3247. Resolution: Fixed Fix Version/s: 5.6.0 Patch applied with svn revision 1087251. Thanks! ensure that activemq-console command like activemq:list/activemq:query/activemq:bstat can work in servicemix container out-of-box - Key: AMQ-3247 URL: https://issues.apache.org/jira/browse/AMQ-3247 Project: ActiveMQ Issue Type: Improvement Components: JMX Affects Versions: 5.4.2 Reporter: Freeman Fang Assignee: Dejan Bosanac Fix For: 5.6.0 Attachments: AMQ-3247-new.patch, AMQ-3247.patch This issue is actually in Servicemix4 we can't use activemq-console command like activemq:list/activemq:query/activemq:bstat out-of-box with default option, more details from SMX4-784[1] [1]https://issues.apache.org/jira/browse/SMX4-784 -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (AMQ-3253) Support Temporary Destinations in a network without advisories
Support Temporary Destinations in a network without advisories -- Key: AMQ-3253 URL: https://issues.apache.org/jira/browse/AMQ-3253 Project: ActiveMQ Issue Type: Improvement Components: Broker Affects Versions: 5.5.0 Reporter: Gary Tully Assignee: Gary Tully Fix For: 5.6.0 Typically network require advisory message to allow peer broker to know about dynamic destination and consumer creation. However the advisory overhead can be significant as the numbers of peer brokers in a network increase to double digits. A statically configured network can exist without advisories but using request reply with temporary currently destinations fails: a) because there is no way to configure them as statically included as their generated name is dynamically created from a connectionId and does not contain a wild card separator '.'. b) it is not possible to auto create a temp destination by a replying message producer (AMQ-2571) Some discussion at: http://mail-archives.apache.org/mod_mbox/activemq-users/201103.mbox/%3CAANLkTi=n3laq4awp8hk48oyagwpsvodvjw4an57j3...@mail.gmail.com%3E -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13013966#comment-13013966 ] Timothy Bish commented on AMQNET-323: - To send a Message with a TTL you need to use the MessageProducer's send method with TTL param, setting it directly on the Message has no affect on TTL of a sent Message. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); // sends normal message, then immediate retry, then retry after 500 ms, then expire. Thread.Sleep(2000); Assert.AreEqual(3, cc.numReceived); } } class CallbackClass { private ISession session; public int numReceived = 0;
[jira] [Commented] (AMQ-3245) SELECTORS doesn't work for releases 5.4.0 to current
[ https://issues.apache.org/jira/browse/AMQ-3245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13013991#comment-13013991 ] Melvin Ramos commented on AMQ-3245: --- Hi Dejan, Ok, that made sense. We are not finding this information elsewhere, at least this is helpful understanding what is going on. From architecture point of view will haven an idea where we need to allocate memory and how to make activemq more reliable. I would close this as fixed as the solution that Dejan mentioned works. Thanks again everyone. Melvin SELECTORS doesn't work for releases 5.4.0 to current Key: AMQ-3245 URL: https://issues.apache.org/jira/browse/AMQ-3245 Project: ActiveMQ Issue Type: Bug Components: Selector Affects Versions: 5.4.1, 5.4.2 Reporter: Melvin Ramos Attachments: ActiveMQ_Test_Case.txt, JmsTestConsumer1.java, JmsTestProducer1.java, activemq.xml Is it possible that selector was broken due to new enhancement regarding REST selectors on 5.4.0? We are using 5.3.0 and selectors are working fine, however since we've upgraded our demo and test environments to 5.4.1 and essentially 5.4.2 it stop working for some reason. I can recreate it 100% of the time and below are the steps. 1) First create the producer with String property set to 30. i.e. test, 30: {code} String username=Me String passwd = invicible String url =failover:(tcp://localhost:51515)?maxReconnectDelay=5000useExponentialBackOff=false; ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(username, passwd, url); Connection connection = connectionFactory.createConnection(); // connection.setUseCompression(true); set this on the URL instead connection.setExceptionListener(this); String destinationString = Test.Dest; // create a session, destination, and producer Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Destination destination = session.createQueue(destinationString); MessageProducer producer = session.createProducer(destination); producer.setDeliveryMode(DeliveryMode.PERSISTENT); Message message = session.createTextMessage(This is a test message); message.setIntProperty(test, 30); // insert the message 1000 times. for (long l = 0L; l 1000; l++) { producer.send(message); } producer.close(); session.close(); connection.close(); {code} Now we have 1000 message sitting on activemq, if you navigate to http://localhost:8161/admin and view Test.Dest queue you should see the 1000 message there. 2) Create the consumer with test 50 selector. {code} public void setup() { String username=Me String passwd = invicible String url =failover:(tcp://localhost:51515)?maxReconnectDelay=5000useExponentialBackOff=false; //tcp://localhost:51515; ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(username, passwd, url); Connection connection = connectionFactory.createConnection(); // connection.setUseCompression(true); set this on the URL instead connection.setExceptionListener(this); // create a session, destination, and consumer Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE); String destinationString = Test.Dest; session.createQueue(destinationString); MessageConsumer consumer = session.createConsumer(destination, test 50); consumer.setMessageListener(this); connection.start(); } public void onMessage(Message message) { try { if (print text) { TextMessage textMessage = (TextMessage) message; System.out.println(textMessage.getText()); } catch (Exception ex) { //swallow } } {code} Once connected to broker, you'll see that it doesn't do anything as the message is not for this selector. 3) Edit the code to producer. {code} message.setIntProperty(test, 60); {code} And then rerun the producer to insert the 1000 records again. Actual: Nothing happens, the consumer just waits for any message that comes in that matches the selector. Expected: The message gets consumed, as the latter part of the producer ran matches the selector. This behavior works perfectly fine with 5.3.0. As selector is an important functionality of JMS as a whole this being broken is actually bad. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
Build failed in Jenkins: ActiveMQ-Apollo #160
See https://hudson.apache.org/hudson/job/ActiveMQ-Apollo/160/changes Changes: [chirino] Bind to IPv4 by default since it seems that windows machines don't have an IPv6 stack enabled by default. [chirino] Fix assertion message. [chirino] Fixed MutableSink bug -- [...truncated 1032 lines...] A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerSummaryDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ServiceStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/EntryStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueMetricsDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ExtensionModule.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ValueDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/package-info.java AUapollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AuthenticationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LogCategoryDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/RouterDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AggregateQueueMetricsDTO.java AU apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DurableSubscriptionDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DurableSubscriptionDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdLabeledDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/WebAdminDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompConnectionStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/NullStoreDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StoreDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LinkDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/IntMetricDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/JsonCodec.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ServiceDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TimeMetricDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectionStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueConsumerStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/SimpleStoreStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/KeyStorageDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/PrincipalDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostDTO.java AU apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/XmlCodec.java A apollo-dto/src/main/resources A apollo-dto/src/main/resources/META-INF A apollo-dto/src/main/resources/META-INF/services A
[jira] [Created] (AMQ-3254) Can't use updateURIsURL, because the entry is missing in the xsd and so the activeMq instance cannot start
Can't use updateURIsURL, because the entry is missing in the xsd and so the activeMq instance cannot start -- Key: AMQ-3254 URL: https://issues.apache.org/jira/browse/AMQ-3254 Project: ActiveMQ Issue Type: Bug Components: Broker Affects Versions: 5.4.2 Reporter: Matthias Wessel Priority: Critical I want to use the new feature of activeMQ 5.4 and I want to add updateURIsURL to the transportConnector to add a link to a csv file. If I add this attribute the activeMQ instance does not start. I think the error is because the xsd of activeMQ 5.4.2 has no such entry. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (AMQ-3253) Support Temporary Destinations in a network without advisories
[ https://issues.apache.org/jira/browse/AMQ-3253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Tully resolved AMQ-3253. - Resolution: Fixed http://svn.apache.org/viewvc?rev=1087330view=rev Added support for configuring the prefix used by connections such that the identity of temp destinations can be controlled. Using a prefix like 'ID:marker.X' allows a wild card matching temp destination to be statically included in a network bridge. The temp destination created for a reply is associated with the connection of the reply message producer. There is an example of the xml and programatic configuration in http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/RequestReplyNoAdvisoryNetworkTest.java?view=markuppathrev=1087330 Support Temporary Destinations in a network without advisories -- Key: AMQ-3253 URL: https://issues.apache.org/jira/browse/AMQ-3253 Project: ActiveMQ Issue Type: Improvement Components: Broker Affects Versions: 5.5.0 Reporter: Gary Tully Assignee: Gary Tully Fix For: 5.6.0 Typically network require advisory message to allow peer broker to know about dynamic destination and consumer creation. However the advisory overhead can be significant as the numbers of peer brokers in a network increase to double digits. A statically configured network can exist without advisories but using request reply with temporary currently destinations fails: a) because there is no way to configure them as statically included as their generated name is dynamically created from a connectionId and does not contain a wild card separator '.'. b) it is not possible to auto create a temp destination by a replying message producer (AMQ-2571) Some discussion at: http://mail-archives.apache.org/mod_mbox/activemq-users/201103.mbox/%3CAANLkTi=n3laq4awp8hk48oyagwpsvodvjw4an57j3...@mail.gmail.com%3E -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (AMQ-3256) For a Master Slave failover broker setup. The system does not reconnect to the broker if the brokers are restarted
For a Master Slave failover broker setup. The system does not reconnect to the broker if the brokers are restarted -- Key: AMQ-3256 URL: https://issues.apache.org/jira/browse/AMQ-3256 Project: ActiveMQ Issue Type: Bug Components: Broker Affects Versions: 5.4.2 Environment: Windows XP Reporter: andy boot Start a Master Slave broker. Connect to them with failover=true and randomize=false Message Sending - ok. Kill the Master broker. Message Sending - ok. Kill the Slave broker. Message Sending - paused (both brokers are down) Restart both brokers. Message Sending - fail. The above WORKS in ActiveMQ 5.3.1 but fails in 5.4.2 I wonder if this is related to: https://issues.apache.org/jira/browse/AMQ-3213 Steps to reproduce the problem: * Run Broker, BrokerSlave, Client, Server, * Note messages being sent from Server to Client * Kill Broker * Note messages being sent from Server to Client * Kill BrokerSlave * Restart Broker BrokerSlave, * Messages no longer being sent. {code:title=Broker.java|borderStyle=solid} public class Broker { public static void main(String[] args) throws Exception { BrokerService broker; broker = BrokerFactory.createBroker(xbean:master.xml); broker.start(); while(true) { Thread.sleep(10*1000); } } } {code} {code:title=BrokerSlave.java|borderStyle=solid} public class BrokerSlave { public static void main(String[] args) throws Exception { BrokerService broker; broker = BrokerFactory.createBroker(xbean:slave.xml); broker.start(); while(true) { Thread.sleep(10*1000); } } } {code} {code:title=Client.java|borderStyle=solid} public class Client { static String url = failover://(tcp://localhost:61616,tcp://localhost:61617)?randomize=false; static String user = null; static String password = null; public static void main(String[] args) throws JMSException, InterruptedException { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url); final Connection connection = connectionFactory.createConnection(); final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); final Queue orderQueue = session.createQueue(VendorOrderQueue); final MessageConsumer consumer = session.createConsumer(orderQueue); consumer.setMessageListener(new MsgL() ); session.run(); connection.start(); while(true) { Thread.sleep(5000); } } private static class MsgL implements MessageListener { public void onMessage(final Message message) { System.out.println(Got message: +message); } } } {code} {code:title=Server.java|borderStyle=solid} public class Server { static String url = failover://(tcp://localhost:61616,tcp://localhost:61617)?randomize=false; static String user = null; static String password = null; public static void main(String[] args) throws JMSException, InterruptedException { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url); final Connection connection = connectionFactory.createConnection(); final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); final Queue orderQueue = session.createQueue(VendorOrderQueue); final MessageProducer producer = session.createProducer(orderQueue); session.run(); connection.start(); for (int i = 0; i 100; i++) { MapMessage message = session.createMapMessage(); message.setString(Item, hello +i); System.out.println(Sending: +message); producer.send(message); System.out.println(Wait for 5s); Thread.sleep(5000); } } } {code} {code:title=master.xml|borderStyle=solid} beans xmlns=http://www.springframework.org/schema/beans; xmlns:amq=http://activemq.apache.org/schema/core; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd; bean class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer/ broker xmlns=http://activemq.apache.org/schema/core; persistent=false waitForSlave=true useJmx=true transportConnectors transportConnector uri=tcp://localhost:61616/ /transportConnectors /broker /beans {code} {code:title=slave.xml|borderStyle=solid} beans
[jira] [Created] (AMQCPP-359) ActiveMQBytesMessage should throw IndexOutOfBoundsException is array length is negative for readBytes method
ActiveMQBytesMessage should throw IndexOutOfBoundsException is array length is negative for readBytes method Key: AMQCPP-359 URL: https://issues.apache.org/jira/browse/AMQCPP-359 Project: ActiveMQ C++ Client Issue Type: Bug Components: Openwire Affects Versions: 3.2.5 Reporter: Timothy Bish Assignee: Timothy Bish Priority: Minor Fix For: 3.2.6, 3.3.0 The method readBytes in ActiveMQBytesMessage is not throwing an exception when the size parameter for the provided array of bytes is negative. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matthew Good reopened AMQNET-323: - Regression: [Unit Test Broken] I changed the unit test to use a send method that takes a ttl parameter. Stepping into the code, I see that all it does is set the NMSTimeToLive like I was doing before. So first, there is no difference whether I set NMSTimeToLive myself or use the Send method that takes a TTL parameter. The unit test still fails. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); // sends normal message, then immediate retry, then retry after 500 ms, then expire. Thread.Sleep(2000); Assert.AreEqual(3, cc.numReceived); } }
[jira] [Commented] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014036#comment-13014036 ] Timothy Bish commented on AMQNET-323: - Please attach updated unit tests with correct call to producer send with TTL as a patch file or complete source, pasted code in JIRA loses all line breaks and other formatting. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); // sends normal message, then immediate retry, then retry after 500 ms, then expire. Thread.Sleep(2000); Assert.AreEqual(3, cc.numReceived); } } class CallbackClass { private ISession session; public int numReceived = 0;
STOMP 1.1 released.. good time for an Apollo beta release
Hi Folks Now that the STOMP 1.1 spec has been released, I figure it's a good time to do a beta release of apollo since it implements that spec. I'm going work on cutting a release candidates, I would love it if more eyeballs could help verify the legal stuff in it. Regards, Hiram FuseSource Web: http://fusesource.com/
[jira] [Updated] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matthew Good updated AMQNET-323: Attachment: TtlUnitTest.txt Unit tests. First one is good and shows Receive works correctly. Second fails and shows callbacks don't work correctly. You can paste these in AMQRedeliveryPolicyTest. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes Attachments: TtlUnitTest.txt When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); // sends normal message, then immediate retry, then retry after 500 ms, then expire. Thread.Sleep(2000); Assert.AreEqual(3, cc.numReceived); } } class CallbackClass { private ISession session; public int numReceived = 0;
Build failed in Jenkins: ActiveMQ-Apollo #161
See https://hudson.apache.org/hudson/job/ActiveMQ-Apollo/161/changes Changes: [chirino] Upgrade to released versions. [chirino] Fixing a couple of license headers. -- [...truncated 1032 lines...] A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerSummaryDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ServiceStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/EntryStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueMetricsDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ExtensionModule.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ValueDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/package-info.java AUapollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AuthenticationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LogCategoryDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/RouterDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AggregateQueueMetricsDTO.java AU apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DurableSubscriptionDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DurableSubscriptionDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdLabeledDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/WebAdminDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompConnectionStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/NullStoreDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StoreDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LinkDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/IntMetricDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/JsonCodec.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ServiceDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TimeMetricDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectionStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueConsumerStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/SimpleStoreStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/KeyStorageDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/PrincipalDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostDTO.java AU apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/XmlCodec.java A apollo-dto/src/main/resources A apollo-dto/src/main/resources/META-INF A apollo-dto/src/main/resources/META-INF/services A apollo-dto/src/main/resources/META-INF/services/org.apache.activemq.apollo A
[jira] [Commented] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014067#comment-13014067 ] Jim Gomes commented on AMQNET-323: -- The Producer doesn't always set the TTL. There is some complex logic in there around setting the TTL, but it's a necessary level of complexity. There are four overloaded public Send() functions. The first two overloaded versions will respect the message's TTL setting. The second two overloaded versions will set the TTL on the message to what is passed in as a parameter. I think the Send() function code is correct, and it is not necessary to call the second set of Send() functions in order to have a TTL set on a message. I haven't studied the original redelivery issue report unit tests yet. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes Attachments: TtlUnitTest.txt When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive =
[jira] [Updated] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jim Gomes updated AMQNET-323: - Description: When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests {code} [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); // sends normal message, then immediate retry, then retry after 500 ms, then expire. Thread.Sleep(2000); Assert.AreEqual(3, cc.numReceived); } } class CallbackClass { private ISession session; public int numReceived = 0; public CallbackClass(ISession session) { this.session = session; } public void consumer_Listener(IMessage message) { numReceived++; ITextMessage m = message as ITextMessage; Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); } } {code} was: When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination);
Build failed in Jenkins: ActiveMQ-Apollo #162
See https://hudson.apache.org/hudson/job/ActiveMQ-Apollo/162/changes Changes: [chirino] enable autoVersionSubmodules [chirino] website updates to better track releases. -- [...truncated 1032 lines...] A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerSummaryDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ServiceStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/EntryStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueMetricsDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ExtensionModule.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ValueDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/package-info.java AUapollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AuthenticationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LogCategoryDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/RouterDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AggregateQueueMetricsDTO.java AU apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DurableSubscriptionDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DurableSubscriptionDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdLabeledDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/WebAdminDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompConnectionStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/NullStoreDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StoreDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LinkDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/IntMetricDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/JsonCodec.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ServiceDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TimeMetricDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectionStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueConsumerStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/SimpleStoreStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/KeyStorageDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/PrincipalDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostDTO.java AU apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/XmlCodec.java A apollo-dto/src/main/resources A apollo-dto/src/main/resources/META-INF A apollo-dto/src/main/resources/META-INF/services A apollo-dto/src/main/resources/META-INF/services/org.apache.activemq.apollo A
Build failed in Jenkins: ActiveMQ-Apollo #163
See https://hudson.apache.org/hudson/job/ActiveMQ-Apollo/163/changes Changes: [chirino] Fixing SCM info in pom. [chirino] [maven-release-plugin] rollback the release of apollo-project-1.0-beta1 [chirino] [maven-release-plugin] prepare release apollo-project-1.0-beta1 -- [...truncated 1036 lines...] A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/EntryStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueMetricsDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ExtensionModule.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ValueDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/package-info.java AUapollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AuthenticationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LogCategoryDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/RouterDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AggregateQueueMetricsDTO.java AU apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DurableSubscriptionDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DurableSubscriptionDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdLabeledDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/WebAdminDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompConnectionStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/NullStoreDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StoreDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LinkDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/IntMetricDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/JsonCodec.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ServiceDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TimeMetricDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectionStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueConsumerStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/SimpleStoreStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/KeyStorageDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/PrincipalDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostDTO.java AU apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/XmlCodec.java A apollo-dto/src/main/resources A apollo-dto/src/main/resources/META-INF A apollo-dto/src/main/resources/META-INF/services A apollo-dto/src/main/resources/META-INF/services/org.apache.activemq.apollo A apollo-dto/src/main/resources/META-INF/services/org.apache.activemq.apollo/modules.index A apollo-dto/src/main/resources/org A apollo-dto/src/main/resources/org/apache A apollo-dto/src/main/resources/org/apache/activemq A apollo-dto/src/main/resources/org/apache/activemq/apollo A
[jira] [Resolved] (AMQCPP-359) ActiveMQBytesMessage should throw IndexOutOfBoundsException is array length is negative for readBytes method
[ https://issues.apache.org/jira/browse/AMQCPP-359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish resolved AMQCPP-359. - Resolution: Fixed Fixed in trunk and the 3.2.x fixes branch. ActiveMQBytesMessage should throw IndexOutOfBoundsException is array length is negative for readBytes method Key: AMQCPP-359 URL: https://issues.apache.org/jira/browse/AMQCPP-359 Project: ActiveMQ C++ Client Issue Type: Bug Components: Openwire Affects Versions: 3.2.5 Reporter: Timothy Bish Assignee: Timothy Bish Priority: Minor Fix For: 3.2.6, 3.3.0 The method readBytes in ActiveMQBytesMessage is not throwing an exception when the size parameter for the provided array of bytes is negative. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
Build failed in Jenkins: ActiveMQ-Apollo #164
See https://hudson.apache.org/hudson/job/ActiveMQ-Apollo/164/ -- Started by an SCM change Building remotely on solaris1 FATAL: Unable to call fetch2. Invalid object ID 35238 java.lang.IllegalStateException: Unable to call fetch2. Invalid object ID 35238 at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:268) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
[jira] [Commented] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014106#comment-13014106 ] Timothy Bish commented on AMQNET-323: - I just looked at the Producer code, I didn't realize that it had been implemented that way. O personally think that incorrect, the point of the producer methods that don't specify a TTL is that it should respect the set value in the Producer and not take something from the Message. It kind of negates the point of having a TTL setting in the Producer and is inconsistent with the other Message properties like priority and delivery mode which are always defaulted to the values set in the Producer. If the user wants to override the set TTL it should be done by calling the appropriate producer send method. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes Attachments: TtlUnitTest.txt When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests {code} [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); // sends normal message, then immediate retry, then retry after 500 ms, then expire. Thread.Sleep(2000); Assert.AreEqual(3, cc.numReceived); } } class CallbackClass { private ISession session; public int numReceived = 0; public CallbackClass(ISession session) { this.session = session; } public void
[VOTE] Apollo 1.0 Beta 1 Staged.. could
Hi all, I think it abut time we have at least a beta release of Apollo so that folks can kick it's tires and get more involved if they want to. I've just cut a release candidate for an Apollo 1.0-beta1 release. Could you review the artifacts and vote? The release has been staged to nexus under: https://repository.apache.org/content/repositories/orgapacheactivemq-055/ Binary distros can be found at: https://repository.apache.org/content/repositories/orgapacheactivemq-055/org/apache/activemq/apache-apollo/1.0-beta1/ Source code distros can be found at: https://repository.apache.org/content/repositories/orgapacheactivemq-055/org/apache/activemq/apollo-project/1.0-beta1/ The build was tagged at: http://svn.apache.org/repos/asf/activemq/activemq-apollo/tags/apollo-project-1.0-beta1/ The project website for that version has been staged to: http://activemq.apache.org/apollo/versions/1.0-beta1/website/index.html Please vote to approve this release [ ] +1 Release the binary as Apache ActiveMQ 5.5.0 [ ] -1 Veto the release (provide specific comments) Here's my +1 Regards, Hiram FuseSource Web: http://fusesource.com/
[jira] [Commented] (AMQ-3254) Can't use updateURIsURL, because the entry is missing in the xsd and so the activeMq instance cannot start
[ https://issues.apache.org/jira/browse/AMQ-3254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014113#comment-13014113 ] Claudio Corsi commented on AMQ-3254: How do you set this value for the transport connector. You need to use the following syntax: failover:(tcp://localhost:61616,tcp://remotehost:61616)?updateURIsURL=file Can't use updateURIsURL, because the entry is missing in the xsd and so the activeMq instance cannot start -- Key: AMQ-3254 URL: https://issues.apache.org/jira/browse/AMQ-3254 Project: ActiveMQ Issue Type: Bug Components: Broker Affects Versions: 5.4.2 Reporter: Matthias Wessel Priority: Critical I want to use the new feature of activeMQ 5.4 and I want to add updateURIsURL to the transportConnector to add a link to a csv file. If I add this attribute the activeMQ instance does not start. I think the error is because the xsd of activeMQ 5.4.2 has no such entry. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
add ajax support to Apollo?
Is this planned/desired? I haven't looked at the Apollo codebase at all, but I'd love to see ActiveMQ's ajax code ported over. My time's very limited, but I'd be willing to at least take a stab at it. alex
Re: add ajax support to Apollo?
It is desired.. but not designed yet! Feel free to take a stab at it. Hopefully that ajax implementation will preserve Apollo's property of running with a constant number of threads regardless of number of connections it's handling. Regards, Hiram FuseSource Web: http://fusesource.com/ On Thu, Mar 31, 2011 at 2:16 PM, Alex Dean a...@crackpot.org wrote: Is this planned/desired? I haven't looked at the Apollo codebase at all, but I'd love to see ActiveMQ's ajax code ported over. My time's very limited, but I'd be willing to at least take a stab at it. alex
[jira] [Commented] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014138#comment-13014138 ] Jim Gomes commented on AMQNET-323: -- I just checked my JMS reference book (Enterprise JMS Programming) to see how it deals with this. It clearly shows an example of creating a message, setting the TTL on that message, and then sending it via a simple send message command. The direct implication being that the TTL that is set on the message would be respected and not overriden by the producer. Shortly after that example, it showed an example of how a semi-global default TTL is set on a per-session basis. NMS doesn't have this concept, but it does have a per-producer setting, which is what you were expecting to be set. It's currently possible to get the behavior you were expecting, but it takes some manual overrides instead of relying on defaults. Something like the following would do what you would want to have by default: {code} producer.Send(msg, producer.DeliveryMode, producer.Priority, producer.TimeToLive); {code} With NMS, we have a good way of setting these defaults because we have the ability to create messages via the producer instead of only via the session. I suggest that the {{Producer.CreateMessage()}} set of functions be modified to set the newly created message's {{NMSTimeToLive}} property to the producer's {{TimeToLive}}. This would be a reasonable way to allow maximum flexibility. The user can set the default time to live for a given producer, but still have the option of overriding it on a message-by-message basis without having to call a different send API to do so. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes Attachments: TtlUnitTest.txt When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests {code} [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer =
[jira] [Commented] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014141#comment-13014141 ] Timothy Bish commented on AMQNET-323: - Per JMS Spec: {noformat} setJMSExpiration() Sets the message's expiration value. JMS providers set this field when a message is sent. This method can be used to change the value for a message that has been received. {noformat} Which means the example in that book is wrong or the provider they used didn't honer this portion of the spec. With current implementation if I receive a Message that has a TTL set and I resend it to another Queue it would retain the old TTL and not honor the settings of my producer so if I wanted to dispatch it to multiple producers some with and some without TTL I have to be manage this with every message send instead of just specifying a TTL when I create the producer and relying on that. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes Attachments: TtlUnitTest.txt When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests {code} [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); // sends normal message, then immediate retry, then retry after 500 ms, then expire. Thread.Sleep(2000); Assert.AreEqual(3, cc.numReceived); } } class CallbackClass { private ISession session; public int numReceived = 0; public
[jira] [Created] (AMQ-3257) Channel was inactive for too long exception occurs with service mix clustering
Channel was inactive for too long exception occurs with service mix clustering -- Key: AMQ-3257 URL: https://issues.apache.org/jira/browse/AMQ-3257 Project: ActiveMQ Issue Type: Bug Components: Connector Environment: Solaris Reporter: GowthamB We are getting the following JMS exceptions in our production environment. While processing transactions suddenly one of the servers goes down after the occurrence of following exceptions. Also, Currently we are restarting the servers to bring up the application. This exception is occurring at least once in a day. It will be great if you can advise on how to suppress these exceptions. javax.jbi.messaging.MessagingException: org.apache.activemq.ConnectionFailedException: The JMS connection has failed: Channel was inactive for too long org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
Jenkins build is still unstable: ActiveMQ » ActiveMQ :: Spring #621
See https://hudson.apache.org/hudson/job/ActiveMQ/org.apache.activemq$activemq-spring/621/
Jenkins build is still unstable: ActiveMQ #621
See https://hudson.apache.org/hudson/job/ActiveMQ/changes
Jenkins build is still unstable: ActiveMQ » ActiveMQ :: Core #621
See https://hudson.apache.org/hudson/job/ActiveMQ/org.apache.activemq$activemq-core/changes
[jira] [Commented] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014148#comment-13014148 ] Jim Gomes commented on AMQNET-323: -- The portion of the Spec that you quoted doesn't mention anything about *when* the expiration value is set, or which component in the provider sets it. I think we have different expectations of the precedence of setting TTL on a given message. And it really only comes down to what will happen with the default {{producer.Send(msg)}} function. The expectation with the other overrides is very clear, because the TTL is specified explicitly in the function call. Like I mentioned, I prefer keeping the current implementation of Send() the way it is, and adding code to the {{Producer.CreateMessage()}} functions to pre-configure the TTL for the message. In order to achieve support for the message relay scenario you mention, what do you think of adding a boolean property to the Producer that will set the producer's default TTL on messages that are sent via the {{producer.Send(msg)}} function? I think if the TTL is specified explicitly in the send function, then it needs to be used instead of the producer's TTL. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes Attachments: TtlUnitTest.txt When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests {code} [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage);
[jira] [Commented] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014155#comment-13014155 ] Matthew Good commented on AMQNET-323: - Although there might be some issue with how TTL is set, Please don't lose track of the original problem this bug is about. The unit test is setting a TTL (one way or another) and the code that deals with listener call backs and retries is not respecting it. I know TTL is getting set because the ActiveMQ server does move it to DLQ at the appropriate time when it expires. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes Attachments: TtlUnitTest.txt When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests {code} [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); // sends normal message, then immediate retry, then retry after 500 ms, then expire. Thread.Sleep(2000); Assert.AreEqual(3, cc.numReceived); } } class CallbackClass { private ISession session; public int numReceived = 0; public CallbackClass(ISession session) { this.session = session; } public void consumer_Listener(IMessage message) { numReceived++; ITextMessage m = message as ITextMessage; Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); } } {code} -- This message is
[jira] [Commented] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014156#comment-13014156 ] Timothy Bish commented on AMQNET-323: - Ok, more from the spec then: {noformat} public void send(Destination destination, Message message) throws JMSException Sends a message to a destination for an unidentified message producer. Uses the MessageProducer's default delivery mode, priority, and time to live. Typically, a message producer is assigned a destination at creation time; however, the JMS API also supports unidentified message producers, which require that the destination be supplied every time a message is sent. {noformat} Notice the verbage, *Uses the MessageProducer's default delivery mode, priority, and time to live.* NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes Attachments: TtlUnitTest.txt When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests {code} [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); // sends normal message, then immediate retry, then retry after 500 ms, then expire. Thread.Sleep(2000); Assert.AreEqual(3, cc.numReceived); } } class CallbackClass { private ISession session; public int numReceived = 0; public CallbackClass(ISession session) { this.session = session; } public
Re: [VOTE] Apollo 1.0 Beta 1 Staged.. could
+1 Release as Apollo 1.0 Beta 1. Beta or Alpha? It's easier to have higher expectations for beta software than for alpha software. Choose your level of warning... On Thu, Mar 31, 2011 at 11:13 AM, Hiram Chirino hi...@hiramchirino.comwrote: Hi all, I think it abut time we have at least a beta release of Apollo so that folks can kick it's tires and get more involved if they want to. I've just cut a release candidate for an Apollo 1.0-beta1 release. Could you review the artifacts and vote? The release has been staged to nexus under: https://repository.apache.org/content/repositories/orgapacheactivemq-055/ Binary distros can be found at: https://repository.apache.org/content/repositories/orgapacheactivemq-055/org/apache/activemq/apache-apollo/1.0-beta1/ Source code distros can be found at: https://repository.apache.org/content/repositories/orgapacheactivemq-055/org/apache/activemq/apollo-project/1.0-beta1/ The build was tagged at: http://svn.apache.org/repos/asf/activemq/activemq-apollo/tags/apollo-project-1.0-beta1/ The project website for that version has been staged to: http://activemq.apache.org/apollo/versions/1.0-beta1/website/index.html Please vote to approve this release [ ] +1 Release the binary as Apache ActiveMQ 5.5.0 [ ] -1 Veto the release (provide specific comments) Here's my +1 Regards, Hiram FuseSource Web: http://fusesource.com/
[jira] [Commented] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014185#comment-13014185 ] Jim Gomes commented on AMQNET-323: -- Agreed. I found the following from the JMS 1.0.2 Spec: {noformat} When a message is sent, expiration is left unassigned. After completion of the send method, it holds the expiration time of the message. This is the sum of the time-to-live value specified by the client and the GMT at the time of the send. {noformat} Combining that with your reference clearly shows that setting the TTL of a message happens in a just-in-time fashion during the Send() operation. This makes me question the value of having the NMSTimeToLive property as a read/write property instead of just a read-only property. It gives a false impression that setting it will have any impact whatsoever. Matthew, apologies for the digression, but I didn't forget the main issue. I didn't intend to hijack the original bug. Guess it's time to enter a separate issue for the TTL setting. Tim, would you like to enter it? NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes Attachments: TtlUnitTest.txt When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests {code} [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); // sends normal message, then immediate retry, then retry after 500 ms, then expire.
[jira] [Commented] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014194#comment-13014194 ] Timothy Bish commented on AMQNET-323: - We need to leave the NMSTimeToLive setter as its used by the Message transformation stuff to pass through the Message properties when converting one providers Message type to another's. I think the thing to do is just clearly define what the MessageProducer does in its various send methods. Right now it seems there's at least three ways that a TTL value can get set or accidentally be set, maybe four. I just find the current methodology kinda confusing and it just feels error prone to me. I don't mind if we deviate from the JMS spec in some areas, but when we do we should really be careful to make it clear in the NMS API docs. Having the producer actually compute the expiration time and set it seems best since a Message could also be created ahead of time and not sent right away, and since NMSTimeToLive takes a TimeSpan it could result in messages getting timed out our way to early. @Matthew, I'm looking into the test failure now, think I know where its going wrong, will report back when I have a fix. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Jim Gomes Attachments: TtlUnitTest.txt When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests {code} [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage);
[jira] [Resolved] (AMQNET-323) NMS Client does not respect TimeToLive with Listener callback
[ https://issues.apache.org/jira/browse/AMQNET-323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish resolved AMQNET-323. - Resolution: Fixed Fix Version/s: 1.6.0 1.5.1 Assignee: Timothy Bish (was: Jim Gomes) Fixed in trunk and 1.5.x fixes. Thanks for the great unit tests. NMS Client does not respect TimeToLive with Listener callback - Key: AMQNET-323 URL: https://issues.apache.org/jira/browse/AMQNET-323 Project: ActiveMQ .Net Issue Type: Bug Components: ActiveMQ, NMS Affects Versions: 1.5.0 Environment: Windows 7 Reporter: Matthew Good Assignee: Timothy Bish Fix For: 1.5.1, 1.6.0 Attachments: TtlUnitTest.txt When TimeToLive expires while a listener is in a redeliver loop, the redelivery never stops. The following unit tests show this. The first unit test uses Receive and it works fine. The second uses a listener and it fails. I added these tests to AMQRedeliveryPolicyTests {code} [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLive() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); ITextMessage m; m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(1000)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // No delay on first Rollback.. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNotNull(m); session.Rollback(); // Show subsequent re-delivery delay is incrementing. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(100)); Assert.IsNull(m); m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); // The message gets redelivered after 500 ms every time since // we are not using exponential backoff. m = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(700)); Assert.IsNull(m); } } [Test] public void TestNornalRedeliveryPolicyOnRollbackUntilTimeToLiveCallback() { using(Connection connection = (Connection) CreateConnection()) { IRedeliveryPolicy policy = connection.RedeliveryPolicy; policy.MaximumRedeliveries = -1; policy.InitialRedeliveryDelay = 500; policy.UseExponentialBackOff = false; connection.Start(); ISession session = connection.CreateSession(AcknowledgementMode.Transactional); IDestination destination = session.CreateTemporaryQueue(); IMessageProducer producer = session.CreateProducer(destination); IMessageConsumer consumer = session.CreateConsumer(destination); CallbackClass cc = new CallbackClass(session); consumer.Listener += new MessageListener(cc.consumer_Listener); // Send the messages ITextMessage textMessage = session.CreateTextMessage(1st); textMessage.NMSTimeToLive = TimeSpan.FromMilliseconds(800.0); producer.Send(textMessage); session.Commit(); // sends normal message, then immediate retry, then retry after 500 ms, then expire. Thread.Sleep(2000); Assert.AreEqual(3, cc.numReceived); } } class CallbackClass { private ISession session; public int numReceived = 0; public CallbackClass(ISession session) { this.session = session; } public void consumer_Listener(IMessage message) { numReceived++; ITextMessage m = message as ITextMessage; Assert.IsNotNull(m); Assert.AreEqual(1st, m.Text); session.Rollback(); } } {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3247) ensure that activemq-console command like activemq:list/activemq:query/activemq:bstat can work in servicemix container out-of-box
[ https://issues.apache.org/jira/browse/AMQ-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13014345#comment-13014345 ] Freeman Fang commented on AMQ-3247: --- Thanks Dejan! ensure that activemq-console command like activemq:list/activemq:query/activemq:bstat can work in servicemix container out-of-box - Key: AMQ-3247 URL: https://issues.apache.org/jira/browse/AMQ-3247 Project: ActiveMQ Issue Type: Improvement Components: JMX Affects Versions: 5.4.2 Reporter: Freeman Fang Assignee: Dejan Bosanac Fix For: 5.6.0 Attachments: AMQ-3247-new.patch, AMQ-3247.patch This issue is actually in Servicemix4 we can't use activemq-console command like activemq:list/activemq:query/activemq:bstat out-of-box with default option, more details from SMX4-784[1] [1]https://issues.apache.org/jira/browse/SMX4-784 -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
Build failed in Jenkins: ActiveMQ-Apollo-Deploy #75
See https://hudson.apache.org/hudson/job/ActiveMQ-Apollo-Deploy/75/changes Changes: [chirino] [maven-release-plugin] prepare for next development iteration [chirino] [maven-release-plugin] prepare release apollo-project-1.0-beta1 [chirino] Fixing SCM info in pom. [chirino] [maven-release-plugin] rollback the release of apollo-project-1.0-beta1 [chirino] [maven-release-plugin] prepare release apollo-project-1.0-beta1 [chirino] enable autoVersionSubmodules [chirino] website updates to better track releases. [chirino] Upgrade to released versions. [chirino] Fixing a couple of license headers. [chirino] Bind to IPv4 by default since it seems that windows machines don't have an IPv6 stack enabled by default. [chirino] Fix assertion message. [chirino] Fixed MutableSink bug -- [...truncated 1032 lines...] A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerSummaryDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ServiceStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/EntryStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueMetricsDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ExtensionModule.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ValueDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/package-info.java AUapollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AuthenticationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LogCategoryDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/RouterDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AggregateQueueMetricsDTO.java AU apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DurableSubscriptionDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/DurableSubscriptionDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdLabeledDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/WebAdminDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompConnectionStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/NullStoreDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StoreDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LinkDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/IntMetricDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/JsonCodec.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ServiceDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TimeMetricDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectionStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueConsumerStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/QueueAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorAclDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/SimpleStoreStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/KeyStorageDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdListDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicDestinationDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/PrincipalDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/TopicStatusDTO.java A apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdDTO.java A