You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Ali Reza.T (JIRA)" <ji...@apache.org> on 2012/07/03 13:40:23 UTC
[jira] [Created] (AMQ-3911) Messages are not acknowelge and
inflight count goes up till max memory is reached for topic
Ali Reza.T created AMQ-3911:
-------------------------------
Summary: Messages are not acknowelge and inflight count goes up till max memory is reached for topic
Key: AMQ-3911
URL: https://issues.apache.org/jira/browse/AMQ-3911
Project: ActiveMQ
Issue Type: Bug
Components: Broker, JMS client
Affects Versions: 5.4.2
Environment: OS: Solaris 10
Java Version: 1.6
Reporter: Ali Reza.T
Priority: Blocker
We have 1 topic, 100 producer and 1 consumer. We use non-transacted sessions, NON_PERSISTENT messages and CLIENT_ACKNOWLEDGE mode. The problem is that after a while (1 day or more) some messages are not acknowledged and inflight count goes up till maximum memory of the topic is reach. Consumer code is something like this:
Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
MessageConsumer consumer = session.createConsumer(JMSProviderUtil.getTopic(AGENT_STATUS_TOPIC));
consumer.setMessageListener(new MessageListener() {
public void onMessage(Message message) {
try {
if (message instanceof TextMessage && message.getJMSRedelivered() == false) {
TextMessage textMessage = (TextMessage) message;
String host = textMessage.getText();
String switchId = host2idMap.get(host);
if (switchId != null) {
id2lastHeartbeatMap.put(switchId, System.currentTimeMillis());
}
}
} catch (JMSException e) {
GeneralLogger.LOGGER.logError(e.getMessage(), e);
} finally {
try {
message.acknowledge();
} catch (JMSException e) {
GeneralLogger.LOGGER.logError(e.getMessage(), e);
}
}
}
});
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3911) Messages are not acknowelge and
inflight count goes up till max memory is reached for topic
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405900#comment-13405900 ]
Timothy Bish commented on AMQ-3911:
-----------------------------------
Do you have logs from the times when this happening, is there anything in them to give more insight? Have you tried with a newer broker release, latest is v5.6.0
> Messages are not acknowelge and inflight count goes up till max memory is reached for topic
> -------------------------------------------------------------------------------------------
>
> Key: AMQ-3911
> URL: https://issues.apache.org/jira/browse/AMQ-3911
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker, JMS client
> Affects Versions: 5.4.2
> Environment: OS: Solaris 10
> Java Version: 1.6
> Reporter: Ali Reza.T
> Priority: Blocker
>
> We have 1 topic, 100 producer and 1 consumer. We use non-transacted sessions, NON_PERSISTENT messages and CLIENT_ACKNOWLEDGE mode. The problem is that after a while (1 day or more) some messages are not acknowledged and inflight count goes up till maximum memory of the topic is reach. Consumer code is something like this:
> {code}
> Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
> MessageConsumer consumer = session.createConsumer(JMSProviderUtil.getTopic(AGENT_STATUS_TOPIC));
> consumer.setMessageListener(new MessageListener() {
> public void onMessage(Message message) {
> try {
> if (message instanceof TextMessage && message.getJMSRedelivered() == false) {
> TextMessage textMessage = (TextMessage) message;
> String host = textMessage.getText();
> String switchId = host2idMap.get(host);
> if (switchId != null) {
> id2lastHeartbeatMap.put(switchId, System.currentTimeMillis());
> }
> }
> } catch (JMSException e) {
> GeneralLogger.LOGGER.logError(e.getMessage(), e);
> } finally {
> try {
> message.acknowledge();
> } catch (JMSException e) {
> GeneralLogger.LOGGER.logError(e.getMessage(), e);
> }
> }
> }
> });
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AMQ-3911) Messages are not acknowelge and
inflight count goes up till max memory is reached for topic
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish updated AMQ-3911:
------------------------------
Description:
We have 1 topic, 100 producer and 1 consumer. We use non-transacted sessions, NON_PERSISTENT messages and CLIENT_ACKNOWLEDGE mode. The problem is that after a while (1 day or more) some messages are not acknowledged and inflight count goes up till maximum memory of the topic is reach. Consumer code is something like this:
{code}
Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
MessageConsumer consumer = session.createConsumer(JMSProviderUtil.getTopic(AGENT_STATUS_TOPIC));
consumer.setMessageListener(new MessageListener() {
public void onMessage(Message message) {
try {
if (message instanceof TextMessage && message.getJMSRedelivered() == false) {
TextMessage textMessage = (TextMessage) message;
String host = textMessage.getText();
String switchId = host2idMap.get(host);
if (switchId != null) {
id2lastHeartbeatMap.put(switchId, System.currentTimeMillis());
}
}
} catch (JMSException e) {
GeneralLogger.LOGGER.logError(e.getMessage(), e);
} finally {
try {
message.acknowledge();
} catch (JMSException e) {
GeneralLogger.LOGGER.logError(e.getMessage(), e);
}
}
}
});
{code}
was:
We have 1 topic, 100 producer and 1 consumer. We use non-transacted sessions, NON_PERSISTENT messages and CLIENT_ACKNOWLEDGE mode. The problem is that after a while (1 day or more) some messages are not acknowledged and inflight count goes up till maximum memory of the topic is reach. Consumer code is something like this:
Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
MessageConsumer consumer = session.createConsumer(JMSProviderUtil.getTopic(AGENT_STATUS_TOPIC));
consumer.setMessageListener(new MessageListener() {
public void onMessage(Message message) {
try {
if (message instanceof TextMessage && message.getJMSRedelivered() == false) {
TextMessage textMessage = (TextMessage) message;
String host = textMessage.getText();
String switchId = host2idMap.get(host);
if (switchId != null) {
id2lastHeartbeatMap.put(switchId, System.currentTimeMillis());
}
}
} catch (JMSException e) {
GeneralLogger.LOGGER.logError(e.getMessage(), e);
} finally {
try {
message.acknowledge();
} catch (JMSException e) {
GeneralLogger.LOGGER.logError(e.getMessage(), e);
}
}
}
});
> Messages are not acknowelge and inflight count goes up till max memory is reached for topic
> -------------------------------------------------------------------------------------------
>
> Key: AMQ-3911
> URL: https://issues.apache.org/jira/browse/AMQ-3911
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker, JMS client
> Affects Versions: 5.4.2
> Environment: OS: Solaris 10
> Java Version: 1.6
> Reporter: Ali Reza.T
> Priority: Blocker
>
> We have 1 topic, 100 producer and 1 consumer. We use non-transacted sessions, NON_PERSISTENT messages and CLIENT_ACKNOWLEDGE mode. The problem is that after a while (1 day or more) some messages are not acknowledged and inflight count goes up till maximum memory of the topic is reach. Consumer code is something like this:
> {code}
> Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
> MessageConsumer consumer = session.createConsumer(JMSProviderUtil.getTopic(AGENT_STATUS_TOPIC));
> consumer.setMessageListener(new MessageListener() {
> public void onMessage(Message message) {
> try {
> if (message instanceof TextMessage && message.getJMSRedelivered() == false) {
> TextMessage textMessage = (TextMessage) message;
> String host = textMessage.getText();
> String switchId = host2idMap.get(host);
> if (switchId != null) {
> id2lastHeartbeatMap.put(switchId, System.currentTimeMillis());
> }
> }
> } catch (JMSException e) {
> GeneralLogger.LOGGER.logError(e.getMessage(), e);
> } finally {
> try {
> message.acknowledge();
> } catch (JMSException e) {
> GeneralLogger.LOGGER.logError(e.getMessage(), e);
> }
> }
> }
> });
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3911) Messages are not acknowelge and
inflight count goes up till max memory is reached for topic
Posted by "Ali Reza.T (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405910#comment-13405910 ]
Ali Reza.T commented on AMQ-3911:
---------------------------------
We had further investigations and we found this happens when the CPU usage goes up due to some other process in server (it reaches around 50%. We have an Sun V880 server with four 1.2 GHz CPUs with 8MB cache). We hadn't tried new versions due to hard update procedure. Is it possible that this problem is solved in newer versions?
> Messages are not acknowelge and inflight count goes up till max memory is reached for topic
> -------------------------------------------------------------------------------------------
>
> Key: AMQ-3911
> URL: https://issues.apache.org/jira/browse/AMQ-3911
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker, JMS client
> Affects Versions: 5.4.2
> Environment: OS: Solaris 10
> Java Version: 1.6
> Reporter: Ali Reza.T
> Priority: Blocker
>
> We have 1 topic, 100 producer and 1 consumer. We use non-transacted sessions, NON_PERSISTENT messages and CLIENT_ACKNOWLEDGE mode. The problem is that after a while (1 day or more) some messages are not acknowledged and inflight count goes up till maximum memory of the topic is reach. Consumer code is something like this:
> {code}
> Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
> MessageConsumer consumer = session.createConsumer(JMSProviderUtil.getTopic(AGENT_STATUS_TOPIC));
> consumer.setMessageListener(new MessageListener() {
> public void onMessage(Message message) {
> try {
> if (message instanceof TextMessage && message.getJMSRedelivered() == false) {
> TextMessage textMessage = (TextMessage) message;
> String host = textMessage.getText();
> String switchId = host2idMap.get(host);
> if (switchId != null) {
> id2lastHeartbeatMap.put(switchId, System.currentTimeMillis());
> }
> }
> } catch (JMSException e) {
> GeneralLogger.LOGGER.logError(e.getMessage(), e);
> } finally {
> try {
> message.acknowledge();
> } catch (JMSException e) {
> GeneralLogger.LOGGER.logError(e.getMessage(), e);
> }
> }
> }
> });
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (AMQ-3911) Messages are not acknowelge and inflight
count goes up till max memory is reached for topic
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish closed AMQ-3911.
-----------------------------
Resolution: Incomplete
No test case, and no logs. Recommend you try a newer version as AMQ 5.4.2 is quite old now.
> Messages are not acknowelge and inflight count goes up till max memory is reached for topic
> -------------------------------------------------------------------------------------------
>
> Key: AMQ-3911
> URL: https://issues.apache.org/jira/browse/AMQ-3911
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker, JMS client
> Affects Versions: 5.4.2
> Environment: OS: Solaris 10
> Java Version: 1.6
> Reporter: Ali Reza.T
> Priority: Blocker
>
> We have 1 topic, 100 producer and 1 consumer. We use non-transacted sessions, NON_PERSISTENT messages and CLIENT_ACKNOWLEDGE mode. The problem is that after a while (1 day or more) some messages are not acknowledged and inflight count goes up till maximum memory of the topic is reach. Consumer code is something like this:
> {code}
> Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
> MessageConsumer consumer = session.createConsumer(JMSProviderUtil.getTopic(AGENT_STATUS_TOPIC));
> consumer.setMessageListener(new MessageListener() {
> public void onMessage(Message message) {
> try {
> if (message instanceof TextMessage && message.getJMSRedelivered() == false) {
> TextMessage textMessage = (TextMessage) message;
> String host = textMessage.getText();
> String switchId = host2idMap.get(host);
> if (switchId != null) {
> id2lastHeartbeatMap.put(switchId, System.currentTimeMillis());
> }
> }
> } catch (JMSException e) {
> GeneralLogger.LOGGER.logError(e.getMessage(), e);
> } finally {
> try {
> message.acknowledge();
> } catch (JMSException e) {
> GeneralLogger.LOGGER.logError(e.getMessage(), e);
> }
> }
> }
> });
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira