[2/2] activemq-artemis git commit: ARTEMIS-1317 Expire messages that got expiredAck() from OpenWire client

2017-08-03 Thread clebertsuconic
ARTEMIS-1317 Expire messages that got expiredAck() from OpenWire client

This fixes org.apache.activemq.JmsSendReceiveWithMessageExpirationTest


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/dfb181a8
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/dfb181a8
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/dfb181a8

Branch: refs/heads/master
Commit: dfb181a8b262c41ff41020eea664040e595a686c
Parents: c5c61f3
Author: Jiri Danek 
Authored: Wed Aug 2 10:19:07 2017 +0200
Committer: Clebert Suconic 
Committed: Thu Aug 3 11:41:58 2017 -0400

--
 .../artemis/core/protocol/openwire/amq/AMQConsumer.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dfb181a8/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
--
diff --git 
a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
 
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
index 6bba4e1..61d2933 100644
--- 
a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
+++ 
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
@@ -298,8 +298,9 @@ public class AMQConsumer {
  }
   }
   if (ack.isExpiredAck()) {
- //adjust delivering count for expired messages
- this.serverConsumer.getQueue().decDelivering(ackList.size());
+ for (MessageReference ref : ackList) {
+ref.getQueue().expire(ref);
+ }
   }
}
 



[1/2] activemq-artemis git commit: This closes #1439

2017-08-03 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/master c5c61f39e -> 64783c250


This closes #1439


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/64783c25
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/64783c25
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/64783c25

Branch: refs/heads/master
Commit: 64783c25048c9e906820dc73989ecd30b1f5a01e
Parents: c5c61f3 dfb181a
Author: Clebert Suconic 
Authored: Thu Aug 3 11:41:58 2017 -0400
Committer: Clebert Suconic 
Committed: Thu Aug 3 11:41:58 2017 -0400

--
 .../artemis/core/protocol/openwire/amq/AMQConsumer.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--




[2/2] activemq-artemis git commit: This closes #1438

2017-08-03 Thread clebertsuconic
This closes #1438


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/c5c61f39
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/c5c61f39
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/c5c61f39

Branch: refs/heads/master
Commit: c5c61f39eb296bdd5af527ae7b17ce2a3c5ae507
Parents: d055411 92c3e7e
Author: Clebert Suconic 
Authored: Thu Aug 3 11:37:16 2017 -0400
Committer: Clebert Suconic 
Committed: Thu Aug 3 11:37:16 2017 -0400

--
 docs/user-manual/en/client-reconnection.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--




[1/2] activemq-artemis git commit: NO JIRA: Doc correction

2017-08-03 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/master d055411f2 -> c5c61f39e


NO JIRA: Doc correction

>From here, it seems the default is -1 not 0 as originally stated in doc.

https://github.com/apache/activemq-artemis/blob/d055411f211974e581d2c657d2f50e21c8f0dbcb/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java#L337


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/92c3e7ef
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/92c3e7ef
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/92c3e7ef

Branch: refs/heads/master
Commit: 92c3e7ef971f75ad58defcbbae767c77eeb93a86
Parents: d055411
Author: Michael André Pearce 
Authored: Thu Aug 3 01:26:49 2017 +0100
Committer: Clebert Suconic 
Committed: Thu Aug 3 11:37:15 2017 -0400

--
 docs/user-manual/en/client-reconnection.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/92c3e7ef/docs/user-manual/en/client-reconnection.md
--
diff --git a/docs/user-manual/en/client-reconnection.md 
b/docs/user-manual/en/client-reconnection.md
index 83ca625..955cada 100644
--- a/docs/user-manual/en/client-reconnection.md
+++ b/docs/user-manual/en/client-reconnection.md
@@ -108,7 +108,7 @@ Client reconnection is configured using the following 
parameters:
 -   `reconnectAttempts`. This optional parameter determines the total
 number of reconnect attempts to make before giving up and shutting
 down. A value of `-1` signifies an unlimited number of attempts. The
-default value is `0`.
+default value is `-1`.
 
 If you're using JMS and you're using JNDI on the client to look up your
 JMS connection factory instances then you can specify these parameters



activemq-artemis git commit: NO-JIRA use URIs on the example

2017-08-03 Thread clebertsuconic
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 930a94bac -> d055411f2


NO-JIRA use URIs on the example


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/d055411f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/d055411f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/d055411f

Branch: refs/heads/master
Commit: d055411f211974e581d2c657d2f50e21c8f0dbcb
Parents: 930a94b
Author: Clebert Suconic 
Authored: Thu Aug 3 11:24:40 2017 -0400
Committer: Clebert Suconic 
Committed: Thu Aug 3 11:25:25 2017 -0400

--
 .../apache/activemq/artemis/jms/example/EmbeddedExample.java   | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d055411f/examples/features/standard/embedded/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
--
diff --git 
a/examples/features/standard/embedded/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
 
b/examples/features/standard/embedded/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
index 61f5a01..54ce764 100644
--- 
a/examples/features/standard/embedded/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
+++ 
b/examples/features/standard/embedded/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
@@ -26,11 +26,8 @@ import javax.jms.TextMessage;
 import java.util.Arrays;
 import java.util.Date;
 
-import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
-import 
org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptorFactory;
-import 
org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory;
 import 
org.apache.activemq.artemis.jms.server.config.ConnectionFactoryConfiguration;
 import org.apache.activemq.artemis.jms.server.config.JMSConfiguration;
 import org.apache.activemq.artemis.jms.server.config.JMSQueueConfiguration;
@@ -46,7 +43,8 @@ public final class EmbeddedExample {
 
public static void main(final String[] args) throws Exception {
   // Step 1. Create ActiveMQ Artemis core configuration, and set the 
properties accordingly
-  Configuration configuration = new 
ConfigurationImpl().setPersistenceEnabled(false).setJournalDirectory("target/data/journal").setSecurityEnabled(false).addAcceptorConfiguration(new
 
TransportConfiguration(NettyAcceptorFactory.class.getName())).addConnectorConfiguration("connector",
 new TransportConfiguration(NettyConnectorFactory.class.getName()));
+  Configuration configuration = new 
ConfigurationImpl().setPersistenceEnabled(false).setJournalDirectory("target/data/journal").setSecurityEnabled(false).addAcceptorConfiguration("tcp",
 "tcp://localhost:61616").
+ addConnectorConfiguration("connector", "tcp://localhost:61616");
 
   // Step 2. Create the JMS configuration
   JMSConfiguration jmsConfig = new JMSConfigurationImpl();



svn commit: r1016341 - in /websites/production/activemq/content: cache/main.pageCache timestampplugin.html

2017-08-03 Thread buildbot
Author: buildbot
Date: Thu Aug  3 15:23:46 2017
New Revision: 1016341

Log:
Production update by buildbot for activemq

Modified:
websites/production/activemq/content/cache/main.pageCache
websites/production/activemq/content/timestampplugin.html

Modified: websites/production/activemq/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/activemq/content/timestampplugin.html
==
--- websites/production/activemq/content/timestampplugin.html (original)
+++ websites/production/activemq/content/timestampplugin.html Thu Aug  3 
15:23:46 2017
@@ -83,8 +83,8 @@
 
 The TimeStampPlugin is a Broker 
interceptor which updates a JMS Client's time stamp on the message with a 
broker time stamp. This can be useful when the clocks on client machines are 
known to not be correct and you can only trust the time set on the broker 
machines.Enabling this plugin will break JMS compliance since the time 
stamp that the producer sees on the messages after 
assend() will be different from the time 
stamp the consumer will observe when he receives the message.By default this plugin is 
not enabled in ActiveMQ.OptionsAttributeDefault 
ValueDescriptionfutureOnlyfalseWhen true the 
plugin will never set a message's time stamp and expiration time to a 
value lower than the original values.When 
false the pluginalways update a 
message's time stamp and expiration time.ttlCeiling0When n
 ot zero, this value (in ms) limit the expiration time.zeroExpirationOverride0When not zero this value (in 
ms) will override the expiration time for messages that do not have an 
expiration already set.To enable the 
TimeStampPlugin add the following to your ActiveMQ Broker 
configuration.Example:
 plugins
-  !-- 86,400ms = 1 day --
-  timeStampingBrokerPlugin ttlCeiling="86400" 
zeroExpirationOverride="86400"/
+  !-- 86,400,000 ms = 1 day --
+  timeStampingBrokerPlugin ttlCeiling="8640" 
zeroExpirationOverride="8640"/
 /plugins
 
  Broker/Consumer 
Clock SynchronizationWhen the consumers local 
clock is running ahead of the brokers local clock then messages might 
not be consumed by your consumer when this plug-in is loaded with default 
configuration as the consumer could perceive the messages as already 
expired.If the clock difference between broker and consumer is 
greater than the message expiration time and if the 
consumers clock is running ahead, then set 
futureOnly="true".See the following http://tmielke.blogspot.com/2011/01/sync-your-machine-clocks.html; 
rel="nofollow">blog post for more details.




[CONF] Apache ActiveMQ > TimeStampPlugin

2017-08-03 Thread Christopher L. Shannon (Confluence)
Title: Message Title



 
 
 
 
 
 
 

Christopher L. Shannon edited a page 
 
 
  
 
 
 
 
 
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
TimeStampPlugin 
 
 
  
 
 
 
 
 
 
 ... 
 
 
 
 Code Block 
 
 
 
 
 
 
 
 
language 
xml 
 
 
  
 
 
 
 
 
  
  864008640" zeroExpirationOverride="864008640"/>

  
 
 
 
 
 
 
 Info 
 
 
 
 
 
 
 
 
title 
 Broker/Consumer Clock Synchronization 
 
 
  
 
 
 
 
 When the consumer’s local clock is running ahead of the broker’s local clock then messages might not be consumed by your consumer when this plug-in is loaded with default configuration as the consumer could perceive the messages as already expired. If the clock difference between broker and consumer is greater than the message expiration time and if the consumer’s clock is running ahead, then set futureOnly="true". See the following blog post for more details.  
 
 
  
 
 
  
 
 
 
 
 
 
 
 
 
 

View page
• 
 
 
 
 
 
 

Like 
 
 
  
 
 
  
 
 
  
 
 
  
 
 
 
 
 
 
 
 
 
 
Stop watching space
• 
 
 
 
 
 
 
Manage notifications 
 
 
 
 
 
 
 
 
 
 
  
 
 
This message was sent by Atlassian Confluence 5.8.17  
 
 
  
 
 
 
 
 
 
 
 
 




svn commit: r1016336 - in /websites/production/activemq/content: cache/main.pageCache per-destination-policies.html

2017-08-03 Thread buildbot
Author: buildbot
Date: Thu Aug  3 11:23:13 2017
New Revision: 1016336

Log:
Production update by buildbot for activemq

Modified:
websites/production/activemq/content/cache/main.pageCache
websites/production/activemq/content/per-destination-policies.html

Modified: websites/production/activemq/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/activemq/content/per-destination-policies.html
==
--- websites/production/activemq/content/per-destination-policies.html 
(original)
+++ websites/production/activemq/content/per-destination-policies.html Thu Aug  
3 11:23:13 2017
@@ -81,7 +81,7 @@
   
 
 
-We support a number of different 
policies which can be attached to individual destinations (queues, topics) or 
to wildcards of queue/topic hierarchies. This makes it easy to configure how 
different regions of the JMS destination space are handled.The 
properties you can set on a Destination are as follows:Common PropertyDefault ValueDescriptionadvisoryForConsumedfalseSend an advisory message when a 
message is consumed by a client.advisoryForDeliveryfalseSend an advisory message when a message is 
sent to a client.advisoryForFastProducersfalseSend an advisory message if a 
producer is deemed fast.advisoryForSlowConsumersfalseSend an advisory message if a 
consumer is deemed slow.advisoryWhenFullfalseSend an advisory message when a limit (memory, store, 
temp disk) is full.cursorMemoryHighWaterMark70The percentage (%) threshold 
applied either to 
thesystemUsage/memoryUsage 
or the destination'smemoryLimit (when 
defined) which when exceeded will cause the destination's cursor to either 
block or write to disk.enableAudittrueWhentrue the broker 
 will track duplicate messages. Duplicates can happen for non-persistent 
messages during failover.gcInactiveDestinationsfalseGarbage collect inactive 
destinations.inactiveTimoutBeforeGC5000The timeout (in ms) after which 
a destination is considered inactive.includeBodyForAdvisoryfalseIncludes the body of the 
original message that triggered th
 e advisory as part of thedataStructure 
field in the advisory message (where applicable). Normally the message body is 
cleared.maxBrowsePageSize400The maximum number of messages to page in 
from the store at one time for a browser.maxDestinations-1(v5.12) 
If0 or greater, sets the maximum number of 
destinations that can be created. This parameter is intended to limit the 
number of hierarchical destinations that can be created under a wildcard 
destination.maxPageSize200The maximum number of messages 
to page in from the store at one time. Increase this value to improve 
performance for queue destination's that contain grouped messages that are 
consumed by multiple concurrent consumers.memoryLimitn/aThe memory limit (in bytes) of 
the destination's cursor.This memory limit is subordinate to the system 
level memory limit, as specified by thesystemUsage/memoryUsage
 attribute. There is no default for this 
value; it
  simply acts as a child to the overall broker memory until the broker memory 
is exhausted.Note: when this limit is specified the 
destination'scursorMemoryHighWaterMark will 
be applied against it and not 
thesystemUsage/memoryUsage
 memory limit.minimumMessageSize1024For non-serialized messages (embedded 
broker) - the assumed size of the message used for memory usage calculation. 
Serialized messages use the serialized size as the basis for the memory 
calculation.prioritizedMessagesfalsePersist message priority 
information.producerFlowControltrueIf 
true the broker will throttle (flow-control) the 
producer. Throttling is achieved either by withholding the producer's ACK or by 
raising 
ajavax.jms.ResourceAllocationException 
(that's propagated back to the client) when local resources e.g., memory and/or 
storage, have been exhausted.Iffalse 
excess messages will be written to the message store to prevent memory 
exhaustion. However, when the message store reaches capacity the producer will 
be throttled until resources are freed.slowCo
 nsumerStrategynullSets the strategy for handling slow consumers. See https://github.com/apache/activemq/blob/master/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java;
 rel="nofollow">AbortSlowConsumerStrategy.storeUsageHighWaterMark100The percentage (%) threshold of 
thesystemUsage/storeUsage 
store limit which when exceeded causes a send to block.useCachetrueIftrue persistent 
messages are cached for fast retrieval from store.usePrefetchExtensiontrueThe prefetch extension is used when amessage is 
delivered but not ACK'ed, such that the broker can dispatchanother 
message, e.g., prefetch == 0, the idea being that there will 
always be prefetch number of messages pending. It also allows a transaction 

[CONF] Apache ActiveMQ > Per Destination Policies

2017-08-03 Thread Gary Tully (Confluence)
Title: Message Title



 
 
 
 
 
 
 

Gary Tully edited a page 
 
 
  
 
 
 
 
 
 
 
  
 
 
 
 
 
 
Change comment: split description of cursorMemoryHighWaterMark 
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Per Destination Policies 
 
 
  
 
 
 
 
 
 
 ... 
 
 
 
 
 Common Property  
 Default Value  
 Description  
 
 
  advisoryForConsumed   
  false   
 Send an advisory message when a message is consumed by a client.  
 
 
  advisoryForDelivery   
  false   
 Send an advisory message when a message is sent to a client.  
 
 
  advisoryForFastProducers   
  false   
 Send an advisory message if a producer is deemed fast.  
 
 
  advisoryForSlowConsumers   
  false   
 Send an advisory message if a consumer is deemed slow.  
 
 
  advisoryWhenFull   
  false   
 Send an advisory message when a limit (memory, store, temp disk) is full.  
 
 
  cursorMemoryHighWaterMark   
  70   
  The percentage (%) threshold applied either to the / or the destination's memoryLimit (when defined) which when exceeded will cause the destination's cursor to either block or write to disk.   
 
 
  enableAudit   
  true   
 When true the broker will track duplicate messages. Duplicates can happen for non-persistent messages during failover.  
 
 
  gcInactiveDestinations   
  false   
 Garbage collect inactive destinations.  
 
 
  inactiveTimoutBeforeGC   
  5000   
 The timeout (in ms) after which a destination is considered inactive.  
 
 
  includeBodyForAdvisory   
  false   
 Includes the body of the original message that triggered the advisory as part of the dataStructure field in the advisory message (where applicable). Normally the message body is cleared.  
 
 
  maxBrowsePageSize   
  400   
 The maximum number of messages to page in from the store at one time for a browser.  
 
 
  maxDestinations   
  -1   
 (v5.12) If 0 or greater, sets the maximum number of destinations that can be created. This parameter is intended to limit the number of hierarchical destinations that can be created under a wildcard destination.  
 
 
  maxPageSize   
  200   
 The maximum number of messages to page in from the store at one time. Increase this value to improve performance for queue destination's that contain grouped messages that are consumed by multiple concurrent consumers.  
 
 
  memoryLimit   
  n/a   
 The memory limit (in bytes) of the destination's cursor. This memory limit is subordinate to the system level memory limit, as specified by the / attribute. There is no default for this value; it simply acts as a child to the overall broker memory until the broker memory is exhausted.  Note: when this limit is specified the destination's cursorMemoryHighWaterMark will be applied against it and not the /> memory limit.  
 
 
  minimumMessageSize   
  1024   
 For non-serialized messages (embedded broker) - the assumed size of the message used for memory usage calculation. Serialized messages use the serialized size as the basis for the memory calculation.  
 
 
  prioritizedMessages   
  false   
 Persist message priority information.  
 
 
  producerFlowControl   
  true   
 If true the broker will throttle (flow-control) the producer. Throttling is achieved either by withholding the producer's ACK or by raising a javax.jms.ResourceAllocationException (that's propagated back to the client) when local resources e.g., memory and/or storage, have been exhausted. If false excess messages will be written to the message store to prevent memory exhaustion. However, when the message store reaches capacity the producer will be throttled until resources are freed.  
 
 
  slowConsumerStrategy   
  null   
 Sets the strategy for handling slow consumers. See AbortSlowConsumerStrategy.   
 
 
  storeUsageHighWaterMark   
  100   
 The percentage (%) threshold of the / store limit which when exceeded causes a send to block.  
 
 
  useCache   
  true   
 If true persistent messages are cached for fast retrieval from store.  
 
 
  usePrefetchExtension 
  true   
 The prefetch extension is used when a message is delivered but not ACK'ed, such that the broker can dispatch another message, e.g., prefetch == 0, the idea being that there will always be prefetch number of messages pending. It also allows a transaction batch to exceed the prefetch value.  
 
 
 
 ... 
 
 
 
 
 Queue Only Property  
 Default Value  
 Description  
 
 
  allConsumersExclusiveByDefault   
  false   
 When true all consumers will be exclusive. See ActiveMQ Exclusive Consumers   
 
 
  cursorMemoryHighWaterMark   
  70   
  The percentage (%) threshold applied either to the / or the destination's memoryLimit (when defined) which when exceeded will cause the destination's cursor to either block or write to disk.   
 
 
  consumersBeforeDispatchStarts   
  0   
 When the first consumer connects, wait for specified number of consumers before message dispatching starts.  
 
 
  expireMessagesPeriod   
  3   
 The period (in ms) of checks for message expiry on queued