[
https://issues.apache.org/jira/browse/AMQ-4502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13647181#comment-13647181
]
Erik commented on AMQ-4502:
---------------------------
Thank you for the clarification. I have read all of the ActiveMQ documentation
and was not clear what the default is supposed to be. Perhaps this issue should
be changed to a documentation feature request? Here is how ActiveMQ 5.8
currently works:
1) When a producer sends a message to a topic using stomp and a consumer is not
present, the message is silently discarded. The web console shows an increase
in the enqueue count. The dequeue count is not used and is always 0. This
occurs when an expires header is set to 0 and also when an expires header is
not present.
2) When a producer sends a message to a queue using stomp and a consumer is not
present, the message is added to the queue. The web console shows an increase
in the enqueue count. The message will never expire. This occurs when an
expires header is set to 0 and also when an expires header is not present.
Additional Comments:
1) I would expect topic and queue destinations to have the same defaults with
respect to how messages are removed. Since the documentation does not state
otherwise, it is not intuitive to think they would be different.
2) The default for queues seems to be a problem. When a producer sends many
messages to a queue periodically and no consumer is present, ActiveMQ's disk
space/memory pool could be depleted. This default requires
intervention/maintenance. One improperly written application written by a
novice developer could bring down the entire messaging server. I would like the
default for queue's to match the default for topics. In other words, messages
sent to queues with no consumers are silently discarded. This is how DBUS works
too.
3) Messages with an expiration cause problems when the producer's clock is not
synchronized with the ActiveMQ server.
4) Perhaps a feature could be enabled to support an expires header with -1. -1
means the message will expire when consumers are not present.
> Stomp messages with no expiration not removed from queue
> --------------------------------------------------------
>
> Key: AMQ-4502
> URL: https://issues.apache.org/jira/browse/AMQ-4502
> Project: ActiveMQ
> Issue Type: Bug
> Components: stomp
> Affects Versions: 5.8.0
> Environment: Linux: Ubuntu 12.04, java openjdk 1.7.
> Reporter: Erik
> Labels: activemq, dequeue, enqueue, expiration, expires, stomp
>
> A producer that sends a message to a queue with no consumers will not be
> dequeued. The messages will never expire. This occurs with Stomp.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira