JBoss hornetq SVN: r10417 - trunk/docs/user-manual/en.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-03-30 09:57:38 -0400 (Wed, 30 Mar 2011)
New Revision: 10417
Modified:
trunk/docs/user-manual/en/ha.xml
Log:
doc fix
Modified: trunk/docs/user-manual/en/ha.xml
===================================================================
--- trunk/docs/user-manual/en/ha.xml 2011-03-30 02:48:54 UTC (rev 10416)
+++ trunk/docs/user-manual/en/ha.xml 2011-03-30 13:57:38 UTC (rev 10417)
@@ -261,8 +261,10 @@
<para>
The caveat to this rule is when XA is used either via JMS or through the core API.
If 2 phase commit is used and prepare has already ben called then rolling back could
- cause a <literal>HeuristicMixedException</literal>. Because of this there may be a
- chance that any non persistent messages could be lost. To avoid this use persistent
+ cause a <literal>HeuristicMixedException</literal>. Because of this the commit will throw
+ a <literal>XAException.XA_RETRY</literal> exception. This informs the Transaction Manager
+ that it should retry the commit at some later point in time, a side effect of this is
+ that any non persistent messages will be lost. To avoid this use persistent
messages when using XA. With acknowledgements this is not an issue since they are
flushed to the server before prepare gets called.
</para>
13 years, 1 month
JBoss hornetq SVN: r10416 - in trunk: hornetq-rest and 8 other directories.
by do-not-reply@jboss.org
Author: bill.burke(a)jboss.com
Date: 2011-03-29 22:48:54 -0400 (Tue, 29 Mar 2011)
New Revision: 10416
Added:
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/PushSubscription.java
Modified:
trunk/build-maven.xml
trunk/hornetq-rest/docbook/pom.xml
trunk/hornetq-rest/hornetq-rest/pom.xml
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/MessageServiceConfiguration.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/MessageServiceManager.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/DestinationServiceManager.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/PostMessage.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/PostMessageDupsOk.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/QueueConsumer.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/QueueDestinationsResource.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumer.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumerResource.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushStrategy.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/UriStrategy.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/xml/PushRegistration.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/AcknowledgedSubscriptionResource.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/PushSubscriptionsResource.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/Subscription.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/SubscriptionResource.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/SubscriptionsResource.java
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/TopicDestinationsResource.java
trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushQueueConsumerTest.java
trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushTopicConsumerTest.java
trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PushQueueConsumerTest.java
trunk/hornetq-rest/pom.xml
Log:
rest updates
Modified: trunk/build-maven.xml
===================================================================
--- trunk/build-maven.xml 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/build-maven.xml 2011-03-30 02:48:54 UTC (rev 10416)
@@ -13,7 +13,7 @@
-->
<project default="upload" name="HornetQ">
- <property name="hornetq.version" value="2.2.0.CR1"/>
+ <property name="hornetq.version" value="2.2.2.Final"/>
<property name="build.dir" value="build"/>
<property name="jars.dir" value="${build.dir}/jars"/>
Modified: trunk/hornetq-rest/docbook/pom.xml
===================================================================
--- trunk/hornetq-rest/docbook/pom.xml 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/docbook/pom.xml 2011-03-30 02:48:54 UTC (rev 10416)
@@ -6,7 +6,7 @@
<groupId>org.hornetq.rest</groupId>
<artifactId>hornetq-rest-reference-guide-${translation}</artifactId>
- <version>2.2.0.CR1</version>
+ <version>2.2.2.Final</version>
<packaging>jdocbook</packaging>
<name>HornetQ REST Interface Reference Guide (${translation})</name>
<repositories>
Modified: trunk/hornetq-rest/hornetq-rest/pom.xml
===================================================================
--- trunk/hornetq-rest/hornetq-rest/pom.xml 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/pom.xml 2011-03-30 02:48:54 UTC (rev 10416)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.hornetq.rest</groupId>
<artifactId>hornetq-rest-all</artifactId>
- <version>2.2.0.CR1</version>
+ <version>2.2.2.Final</version>
</parent>
<groupId>org.hornetq.rest</groupId>
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/MessageServiceConfiguration.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/MessageServiceConfiguration.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/MessageServiceConfiguration.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -11,6 +11,7 @@
public class MessageServiceConfiguration
{
private int producerSessionPoolSize = 10;
+ private long producerTimeToLive = -1;
private int timeoutTaskInterval = 1;
private int consumerSessionTimeoutSeconds = 300;
private int consumerWindowSize = -1;
@@ -87,6 +88,17 @@
this.queuePushStoreDirectory = queuePushStoreDirectory;
}
+ @XmlElement(name="producer-time-to-live")
+ public long getProducerTimeToLive()
+ {
+ return producerTimeToLive;
+ }
+
+ public void setProducerTimeToLive(long producerTimeToLive)
+ {
+ this.producerTimeToLive = producerTimeToLive;
+ }
+
@XmlElement(name = "producer-session-pool-size")
public int getProducerSessionPoolSize()
{
@@ -130,4 +142,5 @@
{
this.consumerWindowSize = consumerWindowSize;
}
+
}
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/MessageServiceManager.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/MessageServiceManager.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/MessageServiceManager.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -175,6 +175,7 @@
queueManager.setDefaultSettings(defaultSettings);
queueManager.setPushStoreFile(configuration.getQueuePushStoreDirectory());
queueManager.setProducerPoolSize(configuration.getProducerSessionPoolSize());
+ queueManager.setProducerTimeToLive(configuration.getProducerTimeToLive());
queueManager.setLinkStrategy(linkStrategy);
queueManager.setRegistry(registry);
@@ -186,6 +187,7 @@
topicManager.setDefaultSettings(defaultSettings);
topicManager.setPushStoreFile(configuration.getTopicPushStoreDirectory());
topicManager.setProducerPoolSize(configuration.getProducerSessionPoolSize());
+ queueManager.setProducerTimeToLive(configuration.getProducerTimeToLive());
topicManager.setLinkStrategy(linkStrategy);
topicManager.setRegistry(registry);
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/DestinationServiceManager.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/DestinationServiceManager.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/DestinationServiceManager.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -24,6 +24,7 @@
protected DestinationSettings defaultSettings = DestinationSettings.defaultSettings;
protected TimeoutTask timeoutTask;
protected int producerPoolSize;
+ protected long producerTimeToLive;
protected LinkStrategy linkStrategy;
protected BindingRegistry registry;
@@ -47,7 +48,16 @@
this.linkStrategy = linkStrategy;
}
+ public long getProducerTimeToLive()
+ {
+ return producerTimeToLive;
+ }
+ public void setProducerTimeToLive(long producerTimeToLive)
+ {
+ this.producerTimeToLive = producerTimeToLive;
+ }
+
public int getProducerPoolSize()
{
return producerPoolSize;
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/PostMessage.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/PostMessage.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/PostMessage.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -36,7 +36,23 @@
protected DestinationServiceManager serviceManager;
private AtomicLong counter = new AtomicLong(1);
private final String startupTime = Long.toString(System.currentTimeMillis());
+ protected long producerTimeToLive;
+ protected static class Pooled
+ {
+ public ClientSession session;
+ public ClientProducer producer;
+
+ private Pooled(ClientSession session, ClientProducer producer)
+ {
+ this.session = session;
+ this.producer = producer;
+ }
+ }
+
+ protected ArrayBlockingQueue<Pooled> pool;
+ protected int poolSize = 10;
+
protected String generateDupId()
{
return startupTime + Long.toString(counter.incrementAndGet());
@@ -44,6 +60,7 @@
public void publish(HttpHeaders headers, byte[] body, String dup,
boolean durable,
+ Long ttl,
Long expiration,
Integer priority) throws Exception
{
@@ -51,7 +68,7 @@
try
{
ClientProducer producer = pooled.producer;
- ClientMessage message = createHornetQMessage(headers, body, durable, expiration, priority, pooled.session);
+ ClientMessage message = createHornetQMessage(headers, body, durable, ttl, expiration, priority, pooled.session);
message.putStringProperty(ClientMessage.HDR_DUPLICATE_DETECTION_ID.toString(), dup);
producer.send(message);
pool.add(pooled);
@@ -73,16 +90,18 @@
@PUT
@Path("{id}")
public Response putWithId(@PathParam("id") String dupId, @QueryParam("durable") Boolean durable,
+ @QueryParam("ttl") Long ttl,
@QueryParam("expiration") Long expiration,
@QueryParam("priority") Integer priority,
@Context HttpHeaders headers, @Context UriInfo uriInfo, byte[] body)
{
- return postWithId(dupId, durable, expiration, priority, headers, uriInfo, body);
+ return postWithId(dupId, durable, ttl, expiration, priority, headers, uriInfo, body);
}
@POST
@Path("{id}")
public Response postWithId(@PathParam("id") String dupId, @QueryParam("durable") Boolean durable,
+ @QueryParam("ttl") Long ttl,
@QueryParam("expiration") Long expiration,
@QueryParam("priority") Integer priority,
@Context HttpHeaders headers, @Context UriInfo uriInfo, byte[] body)
@@ -100,7 +119,7 @@
}
try
{
- publish(headers, body, dupId, isDurable, expiration, priority);
+ publish(headers, body, dupId, isDurable, ttl, expiration, priority);
}
catch (Exception e)
{
@@ -115,22 +134,16 @@
return builder.build();
}
+ public long getProducerTimeToLive()
+ {
+ return producerTimeToLive;
+ }
- protected static class Pooled
+ public void setProducerTimeToLive(long producerTimeToLive)
{
- public ClientSession session;
- public ClientProducer producer;
-
- private Pooled(ClientSession session, ClientProducer producer)
- {
- this.session = session;
- this.producer = producer;
- }
+ this.producerTimeToLive = producerTimeToLive;
}
- protected ArrayBlockingQueue<Pooled> pool;
- protected int poolSize = 10;
-
public DestinationServiceManager getServiceManager()
{
return serviceManager;
@@ -228,6 +241,7 @@
protected ClientMessage createHornetQMessage(HttpHeaders headers, byte[] body,
boolean durable,
+ Long ttl,
Long expiration,
Integer priority,
ClientSession session) throws Exception
@@ -237,6 +251,14 @@
{
message.setExpiration(expiration.longValue());
}
+ else if (ttl != null)
+ {
+ message.setExpiration(System.currentTimeMillis() + ttl.longValue());
+ }
+ else if (producerTimeToLive > 0)
+ {
+ message.setExpiration(System.currentTimeMillis() + producerTimeToLive);
+ }
if (priority != null)
{
byte p = priority.byteValue();
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/PostMessageDupsOk.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/PostMessageDupsOk.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/PostMessageDupsOk.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -24,6 +24,7 @@
{
public void publish(HttpHeaders headers, byte[] body, boolean durable,
+ Long ttl,
Long expiration,
Integer priority) throws Exception
{
@@ -31,7 +32,7 @@
try
{
ClientProducer producer = pooled.producer;
- ClientMessage message = createHornetQMessage(headers, body, durable, expiration, priority, pooled.session);
+ ClientMessage message = createHornetQMessage(headers, body, durable, ttl, expiration, priority, pooled.session);
producer.send(message);
pool.add(pooled);
}
@@ -52,6 +53,7 @@
@POST
public Response create(@Context HttpHeaders headers,
@QueryParam("durable") Boolean durable,
+ @QueryParam("ttl") Long ttl,
@QueryParam("expiration") Long expiration,
@QueryParam("priority") Integer priority,
@Context UriInfo uriInfo,
@@ -64,7 +66,7 @@
{
isDurable = durable.booleanValue();
}
- publish(headers, body, isDurable, expiration, priority);
+ publish(headers, body, isDurable, ttl, expiration, priority);
}
catch (Exception e)
{
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/QueueConsumer.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/QueueConsumer.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/QueueConsumer.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -139,12 +139,6 @@
return checkIndexAndPoll(wait, info, info.getMatchedURIs().get(1), index);
}
- public synchronized Response runPoll(long wait, UriInfo info, String basePath)
- {
- ping();
- return pollWithIndex(wait, info, basePath, -1);
- }
-
protected Response checkIndexAndPoll(long wait, UriInfo info, String basePath, long index)
{
ping();
@@ -167,7 +161,14 @@
}
- return pollWithIndex(wait, info, basePath, index);
+ try
+ {
+ return pollWithIndex(wait, info, basePath, index);
+ }
+ finally
+ {
+ ping(); // ping again as we don't want wait time included in timeout.
+ }
}
protected Response pollWithIndex(long wait, UriInfo info, String basePath, long index)
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/QueueDestinationsResource.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/QueueDestinationsResource.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/QueueDestinationsResource.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -204,6 +204,7 @@
sender.setDestination(queueName);
sender.setSessionFactory(manager.getSessionFactory());
sender.setPoolSize(manager.getProducerPoolSize());
+ sender.setProducerTimeToLive(manager.getProducerTimeToLive());
sender.init();
queueResource.setSender(sender);
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumer.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumer.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumer.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -17,20 +17,22 @@
public class PushConsumer implements MessageHandler
{
private static final Logger log = Logger.getLogger(PushConsumer.class);
- private PushRegistration registration;
+ protected PushRegistration registration;
protected ClientSessionFactory factory;
protected ClientSession session;
protected ClientConsumer consumer;
protected String destination;
protected String id;
protected PushStrategy strategy;
+ protected PushStore store;
- public PushConsumer(ClientSessionFactory factory, String destination, String id, PushRegistration registration)
+ public PushConsumer(ClientSessionFactory factory, String destination, String id, PushRegistration registration, PushStore store)
{
this.factory = factory;
this.destination = destination;
this.id = id;
this.registration = registration;
+ this.store = store;
}
public PushRegistration getRegistration()
@@ -108,14 +110,31 @@
}
}
+ public void disableFromFailure()
+ {
+ registration.setEnabled(false);
+ try
+ {
+ if (registration.isDurable()) store.update(registration);
+ }
+ catch (Exception e)
+ {
+ log.error(e);
+ }
+ stop();
+ }
+
@Override
public void onMessage(ClientMessage clientMessage)
{
- if (strategy.push(clientMessage) == false)
+ boolean acknowledge = strategy.push(clientMessage);
+
+ if (registration.isDisableOnFailure())
{
- throw new RuntimeException("Failed to push message to " + registration.getTarget());
+ log.error("Failed to push message to "+ registration.getTarget() + " disabling push registration...");
+ disableFromFailure();
}
- else
+ if (acknowledge)
{
try
{
@@ -127,5 +146,10 @@
throw new RuntimeException(e);
}
}
+ else
+ {
+ // let hornetq decide what to do
+ throw new RuntimeException("Failed to push message to "+ registration.getTarget());
+ }
}
}
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumerResource.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumerResource.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushConsumerResource.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -57,7 +57,8 @@
public void addRegistration(PushRegistration reg) throws Exception
{
- PushConsumer consumer = new PushConsumer(sessionFactory, destination, reg.getId(), reg);
+ if (reg.isEnabled() == false) return;
+ PushConsumer consumer = new PushConsumer(sessionFactory, destination, reg.getId(), reg, pushStore);
consumer.start();
consumers.put(reg.getId(), consumer);
}
@@ -72,7 +73,7 @@
String genId = sessionCounter.getAndIncrement() + "-" + startup;
registration.setId(genId);
registration.setDestination(destination);
- PushConsumer consumer = new PushConsumer(sessionFactory, destination, genId, registration);
+ PushConsumer consumer = new PushConsumer(sessionFactory, destination, genId, registration, pushStore);
try
{
consumer.start();
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushStrategy.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushStrategy.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/PushStrategy.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -9,6 +9,14 @@
*/
public interface PushStrategy
{
+ /**
+ * Return false if unable to connect. Push consumer may be disabled if configured to do so when unable to connect.
+ * Throw an exception if the message sent was unaccepted by the receiver. Hornetq's retry and dead letter logic
+ * will take over from there.
+ *
+ * @param message
+ * @return
+ */
public boolean push(ClientMessage message);
public void setRegistration(PushRegistration reg);
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/UriStrategy.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/UriStrategy.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/UriStrategy.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -69,9 +69,9 @@
public boolean push(ClientMessage message)
{
String uri = createUri(message);
- for (int i = 0; i < 3; i++)
+ for (int i = 0; i < registration.getMaxRetries(); i++)
{
- int wait = 0;
+ long wait = registration.getRetryWaitMillis();
ClientRequest request = executor.createRequest(uri);
request.followRedirects(false);
@@ -85,31 +85,67 @@
{
log.debug(method + " " + uri);
res = request.httpMethod(method);
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
- if (res.getStatus() == 503)
- {
- String retryAfter = (String) res.getHeaders().getFirst("Retry-After");
- if (retryAfter != null)
+ int status = res.getStatus();
+ if (status == 503)
{
- wait = Integer.parseInt(retryAfter);
+ String retryAfter = (String) res.getHeaders().getFirst("Retry-After");
+ if (retryAfter != null)
+ {
+ wait = Long.parseLong(retryAfter) * 1000;
+ }
}
+ else if (status == 307)
+ {
+ uri = res.getLocation().getHref();
+ wait = 0;
+ }
+ else if ((status >= 200 && status < 299) || status == 303 || status == 304)
+ {
+ log.debug("Success");
+ return true;
+ }
+ else if (status >= 400)
+ {
+ switch (status)
+ {
+ case 400: // these usually mean the message you are trying to send is crap, let dead letter logic take over
+ case 411:
+ case 412:
+ case 413:
+ case 414:
+ case 415:
+ case 416:
+ throw new RuntimeException("Something is wrong with the message, status returned: " + status + " for push registration of URI: " + uri);
+ case 401: // might as well consider these critical failures and abort. Immediately signal to disable push registration depending on config
+ case 402:
+ case 403:
+ case 405:
+ case 406:
+ case 407:
+ case 417:
+ case 505:
+ return false;
+ case 404: // request timeout, gone, and not found treat as a retry
+ case 408:
+ case 409:
+ case 410:
+ break;
+ default: // all 50x requests just retry (except 505)
+ break;
+ }
+ }
}
- else if (res.getStatus() == 307)
+ catch (Exception e)
{
- uri = res.getLocation().getHref();
+ //throw new RuntimeException(e);
}
- else if ((res.getStatus() >= 200 && res.getStatus() < 299) || res.getStatus() == 303 || res.getStatus() == 304)
+ try
{
- log.debug("Success");
- return true;
+ if (wait > 0) Thread.sleep(wait);
}
- else
+ catch (InterruptedException e)
{
- throw new RuntimeException("failed to push message to: " + uri + " status code: " + res.getStatus());
+ throw new RuntimeException("Interrupted");
}
}
return false;
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/xml/PushRegistration.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/xml/PushRegistration.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/queue/push/xml/PushRegistration.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -18,7 +18,7 @@
*/
@XmlRootElement(name = "push-registration")
@XmlAccessorType(XmlAccessType.PROPERTY)
-@XmlType(propOrder = {"destination", "durable", "selector", "target", "authenticationMechanism", "headers"})
+@XmlType(propOrder = {"enabled", "destination", "durable", "selector", "target", "maxRetries", "retryWaitMillis", "disableOnFailure", "authenticationMechanism", "headers"})
public class PushRegistration implements Serializable
{
private String id;
@@ -29,7 +29,55 @@
private String destination;
private Object loadedFrom;
private String selector;
+ private long retryWaitMillis = 1000;
+ private boolean disableOnFailure;
+ private int maxRetries = 10;
+ private boolean enabled = true;
+ @XmlElement
+ public int getMaxRetries()
+ {
+ return maxRetries;
+ }
+
+ public void setMaxRetries(int maxRetries)
+ {
+ this.maxRetries = maxRetries;
+ }
+
+ @XmlElement
+ public long getRetryWaitMillis()
+ {
+ return retryWaitMillis;
+ }
+
+ public void setRetryWaitMillis(long retryWaitMillis)
+ {
+ this.retryWaitMillis = retryWaitMillis;
+ }
+
+ @XmlElement
+ public boolean isDisableOnFailure()
+ {
+ return disableOnFailure;
+ }
+
+ public void setDisableOnFailure(boolean disableOnFailure)
+ {
+ this.disableOnFailure = disableOnFailure;
+ }
+
+ @XmlElement
+ public boolean isEnabled()
+ {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled)
+ {
+ this.enabled = enabled;
+ }
+
@XmlTransient
public Object getLoadedFrom()
{
@@ -121,11 +169,17 @@
public String toString()
{
return "PushRegistration{" +
- "durable=" + durable +
+ "id='" + id + '\'' +
+ ", durable=" + durable +
", target=" + target +
", authenticationMechanism=" + authenticationMechanism +
", headers=" + headers +
", destination='" + destination + '\'' +
+ ", selector='" + selector + '\'' +
+ ", retryWaitMillis=" + retryWaitMillis +
+ ", disableOnFailure=" + disableOnFailure +
+ ", maxRetries=" + maxRetries +
+ ", enabled=" + enabled +
'}';
}
}
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/AcknowledgedSubscriptionResource.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/AcknowledgedSubscriptionResource.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/AcknowledgedSubscriptionResource.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -12,11 +12,15 @@
public class AcknowledgedSubscriptionResource extends AcknowledgedQueueConsumer implements Subscription
{
private boolean durable;
+ private long timeout;
+ private boolean deleteWhenIdle;
- public AcknowledgedSubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector)
+ public AcknowledgedSubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector, boolean durable, Long timeout)
throws HornetQException
{
super(factory, destination, id, serviceManager, selector);
+ this.timeout = timeout;
+ this.durable = durable;
}
public boolean isDurable()
@@ -29,4 +33,23 @@
this.durable = durable;
}
+ public long getTimeout()
+ {
+ return timeout;
+ }
+
+ public void setTimeout(long timeout)
+ {
+ this.timeout = timeout;
+ }
+
+ public boolean isDeleteWhenIdle()
+ {
+ return deleteWhenIdle;
+ }
+
+ public void setDeleteWhenIdle(boolean deleteWhenIdle)
+ {
+ this.deleteWhenIdle = deleteWhenIdle;
+ }
}
Added: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/PushSubscription.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/PushSubscription.java (rev 0)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/PushSubscription.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -0,0 +1,57 @@
+package org.hornetq.rest.topic;
+
+import org.hornetq.api.core.HornetQException;
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.api.core.client.ClientSessionFactory;
+import org.hornetq.core.logging.Logger;
+import org.hornetq.rest.queue.push.PushConsumer;
+import org.hornetq.rest.queue.push.PushStore;
+import org.hornetq.rest.queue.push.xml.PushRegistration;
+
+/**
+ * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class PushSubscription extends PushConsumer
+{
+ private static final Logger log = Logger.getLogger(PushSubscription.class);
+
+ public PushSubscription(ClientSessionFactory factory, String destination, String id, PushRegistration registration, PushStore store)
+ {
+ super(factory, destination, id, registration, store);
+ }
+
+ @Override
+ public void disableFromFailure()
+ {
+ super.disableFromFailure();
+ if (registration.isDurable()) deleteSubscriberQueue();
+ }
+
+ protected void deleteSubscriberQueue()
+ {
+ String subscriptionName = registration.getDestination();
+ ClientSession session = null;
+ try
+ {
+ session = factory.createSession();
+
+ session.deleteQueue(subscriptionName);
+ }
+ catch (HornetQException e)
+ {
+ log.error(e);
+ }
+ finally
+ {
+ try
+ {
+ session.close();
+ }
+ catch (HornetQException e)
+ {
+ }
+ }
+ }
+
+}
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/PushSubscriptionsResource.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/PushSubscriptionsResource.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/PushSubscriptionsResource.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -27,7 +27,7 @@
*/
public class PushSubscriptionsResource
{
- protected Map<String, PushConsumer> consumers = new ConcurrentHashMap<String, PushConsumer>();
+ protected Map<String, PushSubscription> consumers = new ConcurrentHashMap<String, PushSubscription>();
protected ClientSessionFactory sessionFactory;
protected String destination;
protected final String startup = Long.toString(System.currentTimeMillis());
@@ -81,6 +81,7 @@
public void addRegistration(PushTopicRegistration reg) throws Exception
{
+ if (reg.isEnabled() == false) return;
String destination = reg.getDestination();
ClientSession session = sessionFactory.createSession(false, false, false);
ClientSession.QueueQuery query = session.queueQuery(new SimpleString(destination));
@@ -89,7 +90,7 @@
{
createSession = createSubscription(destination, reg.isDurable());
}
- PushConsumer consumer = new PushConsumer(sessionFactory, reg.getDestination(), reg.getId(), reg);
+ PushSubscription consumer = new PushSubscription(sessionFactory, reg.getDestination(), reg.getId(), reg, pushStore);
try
{
consumer.start();
@@ -139,7 +140,7 @@
ClientSession createSession = createSubscription(genId, registration.isDurable());
try
{
- PushConsumer consumer = new PushConsumer(sessionFactory, genId, genId, registration);
+ PushSubscription consumer = new PushSubscription(sessionFactory, genId, genId, registration, pushStore);
try
{
consumer.start();
@@ -191,7 +192,7 @@
deleteSubscriberQueue(consumer);
}
- public Map<String, PushConsumer> getConsumers()
+ public Map<String, PushSubscription> getConsumers()
{
return consumers;
}
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/Subscription.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/Subscription.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/Subscription.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -9,4 +9,12 @@
boolean isDurable();
void setDurable(boolean isDurable);
+
+ long getTimeout();
+
+ void setTimeout(long timeout);
+
+ boolean isDeleteWhenIdle();
+
+ void setDeleteWhenIdle(boolean deleteWhenIdle);
}
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/SubscriptionResource.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/SubscriptionResource.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/SubscriptionResource.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -11,12 +11,16 @@
*/
public class SubscriptionResource extends QueueConsumer implements Subscription
{
- boolean durable;
+ protected boolean durable;
+ protected long timeout;
+ private boolean deleteWhenIdle;
- public SubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector)
+ public SubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector, boolean durable, long timeout)
throws HornetQException
{
super(factory, destination, id, serviceManager, selector);
+ this.durable = durable;
+ this.timeout = timeout;
}
public boolean isDurable()
@@ -28,4 +32,24 @@
{
this.durable = durable;
}
+
+ public long getTimeout()
+ {
+ return timeout;
+ }
+
+ public void setTimeout(long timeout)
+ {
+ this.timeout = timeout;
+ }
+
+ public boolean isDeleteWhenIdle()
+ {
+ return deleteWhenIdle;
+ }
+
+ public void setDeleteWhenIdle(boolean deleteWhenIdle)
+ {
+ this.deleteWhenIdle = deleteWhenIdle;
+ }
}
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/SubscriptionsResource.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/SubscriptionsResource.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/SubscriptionsResource.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -86,15 +86,17 @@
public void testTimeout(String target)
{
QueueConsumer consumer = queueConsumers.get(target);
+ Subscription subscription = (Subscription)consumer;
if (consumer == null) return;
synchronized (consumer)
{
- if (System.currentTimeMillis() - consumer.getLastPingTime() > consumerTimeoutSeconds * 1000)
+ if (System.currentTimeMillis() - consumer.getLastPingTime() > subscription.getTimeout())
{
- log.warn("shutdown REST consumer because of session timeout for: " + consumer.getId());
+ log.warn("shutdown REST subscription because of session timeout for: " + consumer.getId());
consumer.shutdown();
queueConsumers.remove(consumer.getId());
serviceManager.getTimeoutTask().remove(consumer.getId());
+ if (subscription.isDeleteWhenIdle()) deleteSubscriberQueue(consumer);
}
}
}
@@ -124,8 +126,15 @@
@FormParam("autoAck") @DefaultValue("true") boolean autoAck,
@FormParam("name") String subscriptionName,
@FormParam("selector") String selector,
+ @FormParam("delete-when-idle") Boolean destroyWhenIdle,
+ @FormParam("idle-timeout") Long timeout,
@Context UriInfo uriInfo)
{
+
+ if (timeout == null) timeout = new Long(consumerTimeoutSeconds * 1000);
+ boolean deleteWhenIdle = !durable; // default is true if non-durable
+ if (destroyWhenIdle != null) deleteWhenIdle = destroyWhenIdle.booleanValue();
+
if (subscriptionName != null)
{
// see if this is a reconnect
@@ -182,7 +191,7 @@
session.createTemporaryQueue(destination, subscriptionName);
}
}
- QueueConsumer consumer = createConsumer(durable, autoAck, subscriptionName, selector);
+ QueueConsumer consumer = createConsumer(durable, autoAck, subscriptionName, selector, timeout, deleteWhenIdle);
queueConsumers.put(consumer.getId(), consumer);
serviceManager.getTimeoutTask().add(this, consumer.getId());
@@ -222,20 +231,22 @@
}
}
- protected QueueConsumer createConsumer(boolean durable, boolean autoAck, String subscriptionName, String selector)
+ protected QueueConsumer createConsumer(boolean durable, boolean autoAck, String subscriptionName, String selector, long timeout, boolean deleteWhenIdle)
throws HornetQException
{
QueueConsumer consumer;
if (autoAck)
{
- SubscriptionResource subscription = new SubscriptionResource(sessionFactory, subscriptionName, subscriptionName, serviceManager, selector);
+ SubscriptionResource subscription = new SubscriptionResource(sessionFactory, subscriptionName, subscriptionName, serviceManager, selector, durable, timeout);
subscription.setDurable(durable);
+ subscription.setDeleteWhenIdle(deleteWhenIdle);
consumer = subscription;
}
else
{
- AcknowledgedSubscriptionResource subscription = new AcknowledgedSubscriptionResource(sessionFactory, subscriptionName, subscriptionName, serviceManager, selector);
+ AcknowledgedSubscriptionResource subscription = new AcknowledgedSubscriptionResource(sessionFactory, subscriptionName, subscriptionName, serviceManager, selector, durable, timeout);
subscription.setDurable(durable);
+ subscription.setDeleteWhenIdle(deleteWhenIdle);
consumer = subscription;
}
return consumer;
@@ -370,7 +381,7 @@
QueueConsumer tmp = null;
try
{
- tmp = createConsumer(true, autoAck, subscriptionId, null);
+ tmp = createConsumer(true, autoAck, subscriptionId, null, consumerTimeoutSeconds * 1000, false);
}
catch (HornetQException e)
{
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/TopicDestinationsResource.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/TopicDestinationsResource.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/topic/TopicDestinationsResource.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -197,6 +197,7 @@
sender.setDestination(topicName);
sender.setSessionFactory(manager.getSessionFactory());
sender.setPoolSize(manager.getProducerPoolSize());
+ sender.setProducerTimeToLive(manager.getProducerTimeToLive());
sender.setServiceManager(manager);
sender.init();
topicResource.setSender(sender);
Modified: trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushQueueConsumerTest.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushQueueConsumerTest.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushQueueConsumerTest.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -74,7 +74,7 @@
Link sender = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "create");
System.out.println("create: " + sender);
Link pushSubscriptions = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "push-consumers");
- System.out.println("push consumers: " + pushSubscriptions);
+ System.out.println("push subscriptions: " + pushSubscriptions);
request = new ClientRequest(generateURL("/queues/forwardQueue"));
response = request.head();
@@ -112,6 +112,49 @@
shutdown();
}
+ @Test
+ public void testFailure() throws Exception
+ {
+ startup();
+ deployQueues();
+
+ ClientRequest request = new ClientRequest(generateURL("/queues/testQueue"));
+
+ ClientResponse<?> response = request.head();
+ Assert.assertEquals(200, response.getStatus());
+ Link sender = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "create");
+ System.out.println("create: " + sender);
+ Link pushSubscriptions = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "push-consumers");
+ System.out.println("push subscriptions: " + pushSubscriptions);
+
+ PushRegistration reg = new PushRegistration();
+ reg.setDurable(true);
+ XmlLink target = new XmlLink();
+ target.setHref("http://localhost:3333/error");
+ target.setRelationship("uri");
+ reg.setTarget(target);
+ reg.setDisableOnFailure(true);
+ reg.setMaxRetries(3);
+ reg.setRetryWaitMillis(10);
+ response = pushSubscriptions.request().body("application/xml", reg).post();
+ Assert.assertEquals(201, response.getStatus());
+ Link pushSubscription = response.getLocation();
+
+ ClientResponse res = sender.request().body("text/plain", Integer.toString(1)).post();
+ Assert.assertEquals(201, res.getStatus());
+
+ Thread.sleep(1000);
+
+ response = pushSubscription.request().get();
+ PushRegistration reg2 = response.getEntity(PushRegistration.class);
+ Assert.assertEquals(reg.isDurable(), reg2.isDurable());
+ Assert.assertEquals(reg.getTarget().getHref(), reg2.getTarget().getHref());
+ Assert.assertFalse(reg2.isEnabled());
+
+ manager.getQueueManager().getPushStore().removeAll();
+ shutdown();
+ }
+
private void deployQueues()
throws Exception
{
Modified: trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushTopicConsumerTest.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushTopicConsumerTest.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushTopicConsumerTest.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -1,12 +1,15 @@
package org.hornetq.rest.test;
+import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
+import org.hornetq.api.core.client.ClientSession;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.rest.MessageServiceManager;
+import org.hornetq.rest.queue.push.xml.PushRegistration;
import org.hornetq.rest.queue.push.xml.XmlLink;
import org.hornetq.rest.topic.PushTopicRegistration;
import org.hornetq.rest.topic.TopicDeployment;
@@ -82,6 +85,56 @@
}
@Test
+ public void testFailure() throws Exception
+ {
+ startup();
+ deployTopic();
+
+ ClientRequest request = new ClientRequest(generateURL("/topics/testTopic"));
+
+ ClientResponse<?> response = request.head();
+ Assert.assertEquals(200, response.getStatus());
+ Link sender = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "create");
+ System.out.println("create: " + sender);
+ Link pushSubscriptions = MessageTestBase.getLinkByTitle(manager.getQueueManager().getLinkStrategy(), response, "push-subscriptions");
+ System.out.println("push subscriptions: " + pushSubscriptions);
+
+ PushTopicRegistration reg = new PushTopicRegistration();
+ reg.setDurable(true);
+ XmlLink target = new XmlLink();
+ target.setHref("http://localhost:3333/error");
+ target.setRelationship("uri");
+ reg.setTarget(target);
+ reg.setDisableOnFailure(true);
+ reg.setMaxRetries(3);
+ reg.setRetryWaitMillis(10);
+ response = pushSubscriptions.request().body("application/xml", reg).post();
+ Assert.assertEquals(201, response.getStatus());
+ Link pushSubscription = response.getLocation();
+
+ ClientResponse res = sender.request().body("text/plain", Integer.toString(1)).post();
+ Assert.assertEquals(201, res.getStatus());
+
+ Thread.sleep(1000);
+
+ response = pushSubscription.request().get();
+ PushTopicRegistration reg2 = response.getEntity(PushTopicRegistration.class);
+ Assert.assertEquals(reg.isDurable(), reg2.isDurable());
+ Assert.assertEquals(reg.getTarget().getHref(), reg2.getTarget().getHref());
+ Assert.assertFalse(reg2.isEnabled());
+
+ String destination = reg2.getDestination();
+ ClientSession session = manager.getQueueManager().getSessionFactory().createSession(false, false, false);
+ ClientSession.QueueQuery query = session.queueQuery(new SimpleString(destination));
+ Assert.assertFalse(query.isExists());
+
+
+ manager.getQueueManager().getPushStore().removeAll();
+ shutdown();
+ }
+
+
+ @Test
public void testSuccessFirst() throws Exception
{
startup();
Modified: trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PushQueueConsumerTest.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PushQueueConsumerTest.java 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/hornetq-rest/src/test/java/org/hornetq/rest/test/PushQueueConsumerTest.java 2011-03-30 02:48:54 UTC (rev 10416)
@@ -202,4 +202,5 @@
Assert.assertEquals("1", MyResource.gotit);
Assert.assertEquals(204, pushSubscription.request().delete().getStatus());
}
+
}
Modified: trunk/hornetq-rest/pom.xml
===================================================================
--- trunk/hornetq-rest/pom.xml 2011-03-30 02:48:02 UTC (rev 10415)
+++ trunk/hornetq-rest/pom.xml 2011-03-30 02:48:54 UTC (rev 10416)
@@ -5,12 +5,12 @@
<name>HornetQ REST Interface Parent POM</name>
<groupId>org.hornetq.rest</groupId>
<artifactId>hornetq-rest-all</artifactId>
- <version>2.2.2.CR1</version>
+ <version>2.2.2.Final</version>
<packaging>pom</packaging>
<properties>
- <resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.2.CR1</hornetq.version>
+ <resteasy.version>2.1.0.GA</resteasy.version>
+ <hornetq.version>2.2.2.Final</hornetq.version>
</properties>
<licenses>
13 years, 1 month
JBoss hornetq SVN: r10415 - trunk/hornetq-rest/docbook/reference/en.
by do-not-reply@jboss.org
Author: bill.burke(a)jboss.com
Date: 2011-03-29 22:48:02 -0400 (Tue, 29 Mar 2011)
New Revision: 10415
Modified:
trunk/hornetq-rest/docbook/reference/en/master.xml
Log:
blah
Modified: trunk/hornetq-rest/docbook/reference/en/master.xml
===================================================================
--- trunk/hornetq-rest/docbook/reference/en/master.xml 2011-03-30 00:38:59 UTC (rev 10414)
+++ trunk/hornetq-rest/docbook/reference/en/master.xml 2011-03-30 02:48:02 UTC (rev 10415)
@@ -5,7 +5,7 @@
<bookinfo>
<title>HornetQ REST Interface</title>
- <releaseinfo>2.2.0</releaseinfo>
+ <releaseinfo>2.2.2</releaseinfo>
</bookinfo>
<toc></toc>
@@ -307,6 +307,7 @@
<dups-ok>true</dups-ok>
<topic-push-store-dir>topic-push-store</topic-push-store-dir>
<queue-push-store-dir>queue-push-store</queue-push-store-dir>
+ <producer-time-to-live>0</producer-time-to-live>
<producer-session-pool-size>10</producer-session-pool-size>
<session-timeout-task-interval>1</session-timeout-task-interval>
<consumer-session-timeout-seconds>300</consumer-session-timeout-seconds>
@@ -388,6 +389,15 @@
</varlistentry>
<varlistentry>
+ <term>producer-time-to-live</term>
+
+ <listitem>
+ <para>Default time to live for posted messages. Default is no
+ ttl.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>session-timeout-task-interval</term>
<listitem>
@@ -809,9 +819,19 @@
</order>
</programlisting>
</sect1>
- <sect1>
- <title>Expiration and Priority</title>
- <para>You can set he expiration and the priority of the message in the queue or topic by setting an additional query parameter. The <literal>expiration</literal> query parameter is an integer expressing the time in milliseconds until the message should be expired. The <literal>priority</literal> is another query parameter with an integer value between 0 and 9 expressing the priority of the message. i.e.:</para>
+
+ <sect1>
+ <title>TTL, Expiration and Priority</title>
+
+ <para>You can set the time to live, expiration, and/or the priority of
+ the message in the queue or topic by setting an additional query
+ parameter. The <literal>expiration</literal> query parameter is an long
+ specify the time in milliseconds since epoch (a long date). The
+ <literal>ttl</literal> query parameter is a time in milliseconds you
+ want the message active. The <literal>priority</literal> is another
+ query parameter with an integer value between 0 and 9 expressing the
+ priority of the message. i.e.:</para>
+
<programlisting>POST /queues/jms.queue.bar/create?expiration=30000&priority=3
Host: example.com
Content-Type: application/xml
@@ -822,7 +842,7 @@
<cost>$199.99</cost>
</order>
</programlisting>
- </sect1>
+ </sect1>
</chapter>
<chapter>
@@ -884,6 +904,7 @@
the server. Only usable on topics.</para>
</listitem>
</varlistentry>
+
<varlistentry>
<term>selector</term>
@@ -894,6 +915,24 @@
charactor is converted to a '$'.</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term>idle-timeout</term>
+
+ <listitem>
+ <para>For a topic subscription, idle time in milliseconds in which
+ the consumer connections will be closed if idle.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>delete-when-idle</term>
+
+ <listitem>
+ <para>Boolean value, If true, a topic subscription will be deleted
+ (even if it is durable) when an the idle timeout is reached.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
<sect1>
@@ -1509,6 +1548,9 @@
]]>
</selector>
<link rel="push" href="http://somewhere.com" type="application/json" method="PUT"/>
+ <maxRetries>5</maxRetries>
+ <retryWaitMillis>1000</retryWaitMillis>
+ <disableOnFailure>true</disableOnFailure>
</push-registration>
</programlisting>
@@ -1525,6 +1567,19 @@
JMS message selector. You should enclose it within CDATA blocks as some
of the selector characters are illegal XML.</para>
+ <para>The <literal>maxRetries</literal> element specifies how many times
+ a the server will try to push a message to a URL if there is a
+ connection failure.</para>
+
+ <para>The <literal>retryWaitMillis</literal> element specifies how long
+ to wait before performing a retry.</para>
+
+ <para>The <literal>disableOnFailure</literal> element, if set to true,
+ will disable the registration if all retries have failed. It will not
+ disable the connection on non-connection-failure issues (like a bad
+ request for instance). In these cases, the dead letter queue logic of
+ HornetQ will take over.</para>
+
<para>The <literal>link</literal> element specifies the basis of the
interaction. The <literal>href</literal> attribute contains the URL you
want to interact with. It is the only required attribute. The
@@ -1595,7 +1650,7 @@
<para>The push XML for a topic is the same except the root element is
push-topic-registration. (Also remember the <literal>selector</literal>
- element is optional). The rest of the document is the same. Here's an
+ element is optional). The rest of the document is the same. Here's an
example of a template registration:</para>
<programlisting><push-topic-registration>
13 years, 1 month
JBoss hornetq SVN: r10414 - trunk/docs/user-manual.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-29 20:38:59 -0400 (Tue, 29 Mar 2011)
New Revision: 10414
Added:
trunk/docs/user-manual/publican.cfg
Log:
file used by publican
Added: trunk/docs/user-manual/publican.cfg
===================================================================
--- trunk/docs/user-manual/publican.cfg (rev 0)
+++ trunk/docs/user-manual/publican.cfg 2011-03-30 00:38:59 UTC (rev 10414)
@@ -0,0 +1,7 @@
+# Config::Simple 4.59
+# Tue Mar 29 06:11:07 2011
+
+xml_lang: en
+type: Book
+brand: common
+
13 years, 1 month
JBoss hornetq SVN: r10413 - trunk/docs/user-manual/en.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-29 20:38:39 -0400 (Tue, 29 Mar 2011)
New Revision: 10413
Removed:
trunk/docs/user-manual/en/master.xml
Log:
removing empty file
Deleted: trunk/docs/user-manual/en/master.xml
===================================================================
13 years, 1 month
JBoss hornetq SVN: r10412 - in trunk/docs: user-manual and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-29 20:37:32 -0400 (Tue, 29 Mar 2011)
New Revision: 10412
Modified:
trunk/docs/quickstart-guide/
trunk/docs/user-manual/
Log:
svn:ignore
Property changes on: trunk/docs/quickstart-guide
___________________________________________________________________
Modified: svn:ignore
- build
+ build
target
Property changes on: trunk/docs/user-manual
___________________________________________________________________
Modified: svn:ignore
- build
+ build
target
13 years, 1 month
JBoss hornetq SVN: r10411 - trunk/docs/user-manual/en.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-29 20:37:06 -0400 (Tue, 29 Mar 2011)
New Revision: 10411
Modified:
trunk/docs/user-manual/en/Book_Info.xml
trunk/docs/user-manual/en/clusters.xml
trunk/docs/user-manual/en/configuration-index.xml
trunk/docs/user-manual/en/ha.xml
trunk/docs/user-manual/en/management.xml
trunk/docs/user-manual/en/queue-attributes.xml
trunk/docs/user-manual/en/using-core.xml
Log:
Removing invalid links
Modified: trunk/docs/user-manual/en/Book_Info.xml
===================================================================
--- trunk/docs/user-manual/en/Book_Info.xml 2011-03-29 17:18:19 UTC (rev 10410)
+++ trunk/docs/user-manual/en/Book_Info.xml 2011-03-30 00:37:06 UTC (rev 10411)
@@ -20,6 +20,7 @@
<title>HornetQ User Manual</title>
<subtitle>Putting the buzz in messaging</subtitle>
<productname>HornetQ</productname>
+ <productnumber>2</productnumber>
<edition>2.1.0</edition>
<pubsnumber>1</pubsnumber>
<abstract>
Modified: trunk/docs/user-manual/en/clusters.xml
===================================================================
--- trunk/docs/user-manual/en/clusters.xml 2011-03-29 17:18:19 UTC (rev 10410)
+++ trunk/docs/user-manual/en/clusters.xml 2011-03-30 00:37:06 UTC (rev 10411)
@@ -14,7 +14,7 @@
-->
<chapter id="clusters">
- <title>HornetQ and EAP Cluster Configuration</title>
+ <title>HornetQ and Application Server Cluster Configuration</title>
<section>
<title>Configuring Failover</title>
<para>
Modified: trunk/docs/user-manual/en/configuration-index.xml
===================================================================
--- trunk/docs/user-manual/en/configuration-index.xml 2011-03-29 17:18:19 UTC (rev 10410)
+++ trunk/docs/user-manual/en/configuration-index.xml 2011-03-30 00:37:06 UTC (rev 10411)
@@ -53,14 +53,13 @@
<entry>false</entry>
</row>
<row>
- <entry><link linkend="ha/mode.shared.configuration">backup</link></entry>
+ <entry>backup</entry>
<entry>Boolean</entry>
<entry>Is this server a backup server</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="configuring.bindings.journal"
- >bindings-directory</link></entry>
+ <entry><link linkend="configuring.bindings.journal">bindings-directory</link></entry>
<entry>String</entry>
<entry>the directory to store the persisted bindings to</entry>
<entry>data/bindings</entry>
@@ -253,7 +252,7 @@
<entry>jms.queue.hornetq.management</entry>
</row>
<row>
- <entry><link linkend="clusters.clusteruser"
+ <entry><link linkend="clusters"
>cluster-user</link></entry>
<entry>String</entry>
<entry>the user used by cluster connections to communicate between the
@@ -261,7 +260,7 @@
<entry>HORNETQ.CLUSTER.ADMIN.USER</entry>
</row>
<row>
- <entry><link linkend="clusters.clusteruser"
+ <entry><link linkend="clusters"
>cluster-password</link></entry>
<entry>String</entry>
<entry>the password used by cluster connections to communicate between the
@@ -514,7 +513,7 @@
<entry/>
</row>
<row>
- <entry><link linkend="clusters.broadcast-groups"
+ <entry><link linkend="clusters"
>broadcast-groups</link></entry>
<entry>BroadcastGroup</entry>
<entry>a list of broadcast groups to create</entry>
@@ -522,7 +521,7 @@
</row>
<row>
<entry>
- <link linkend="clusters.broadcast-groups">broadcast-group.name (attribute)</link>
+ <link linkend="clusters">broadcast-group.name (attribute)</link>
</entry>
<entry>String</entry>
<entry>a unique name for the broadcast group - mandatory</entry>
@@ -530,7 +529,7 @@
</row>
<row>
<entry>
- <link linkend="clusters.broadcast-groups">broadcast-group.local-bind-address</link>
+ <link linkend="clusters">broadcast-group.local-bind-address</link>
</entry>
<entry>String</entry>
<entry>local bind address that the datagram socket is bound to</entry>
@@ -538,7 +537,7 @@
</row>
<row>
<entry>
- <link linkend="clusters.broadcast-groups">broadcast-group.local-bind-port</link>
+ <link linkend="clusters">broadcast-group.local-bind-port</link>
</entry>
<entry>Integer</entry>
<entry>local port to which the datagram socket is bound to</entry>
@@ -546,7 +545,7 @@
</row>
<row>
<entry>
- <link linkend="clusters.broadcast-groups">broadcast-group.group-address</link>
+ <link linkend="clusters">broadcast-group.group-address</link>
</entry>
<entry>String</entry>
<entry>multicast address to which the data will be broadcast - mandatory</entry>
@@ -554,7 +553,7 @@
</row>
<row>
<entry>
- <link linkend="clusters.broadcast-groups">broadcast-group.group-port</link>
+ <link linkend="clusters">broadcast-group.group-port</link>
</entry>
<entry>Integer</entry>
<entry>UDP port number used for broadcasting - mandatory</entry>
@@ -562,7 +561,7 @@
</row>
<row>
<entry>
- <link linkend="clusters.broadcast-groups">broadcast-group.broadcast-period</link>
+ <link linkend="clusters">broadcast-group.broadcast-period</link>
</entry>
<entry>Long</entry>
<entry>period in milliseconds between consecutive broadcasts</entry>
@@ -570,7 +569,7 @@
</row>
<row>
<entry>
- <link linkend="clusters.broadcast-groups">broadcast-group.connector-ref</link>
+ <link linkend="clusters">broadcast-group.connector-ref</link>
</entry>
<entry>A pair of connector</entry>
<entry>A pair connector and
@@ -579,7 +578,7 @@
</row>
<row>
<entry>
- <link linkend="clusters.broadcast-groups">broadcast-group.connector-ref.connector-name (attribute)</link>
+ <link linkend="clusters">broadcast-group.connector-ref.connector-name (attribute)</link>
</entry>
<entry>String</entry>
<entry>Name of the live connector - mandatory</entry>
@@ -587,21 +586,21 @@
</row>
<row>
<entry>
- <link linkend="clusters.broadcast-groups">broadcast-group.connector-ref.backup-connector-name (attribute)</link>
+ <link linkend="clusters">broadcast-group.connector-ref.backup-connector-name (attribute)</link>
</entry>
<entry>String</entry>
<entry>Name of the backup connector - optional</entry>
<entry/>
</row>
<row>
- <entry><link linkend="clusters.discovery-groups"
+ <entry><link linkend="clusters"
>discovery-groups</link></entry>
<entry>DiscoveryGroup</entry>
<entry>a list of discovery groups to create</entry>
<entry/>
</row>
<row>
- <entry><link linkend="clusters.discovery-groups"
+ <entry><link linkend="clusters"
>discovery-group.name (attribute)</link></entry>
<entry>String</entry>
<entry>a unique name for the discovery group - mandatory</entry>
@@ -609,7 +608,7 @@
</row>
<row>
<entry>
- <link linkend="clusters.discovery-groups">discovery-group.local-bind-address</link>
+ <link linkend="clusters">discovery-group.local-bind-address</link>
</entry>
<entry>String</entry>
<entry>the discovery group will be bound only to this local address</entry>
@@ -617,7 +616,7 @@
</row>
<row>
<entry id="configuration.discovery-group.group-address">
- <link linkend="clusters.discovery-groups">discovery-group.group-address</link>
+ <link linkend="clusters">discovery-group.group-address</link>
</entry>
<entry>String</entry>
<entry>Multicast IP address of the group to listen on - mandatory</entry>
@@ -625,7 +624,7 @@
</row>
<row>
<entry id="configuration.discovery-group.group-port">
- <link linkend="clusters.discovery-groups">discovery-group.group-port</link>
+ <link linkend="clusters">discovery-group.group-port</link>
</entry>
<entry>Integer</entry>
<entry>UDP port of the multicast group - mandatory</entry>
@@ -633,7 +632,7 @@
</row>
<row>
<entry id="configuration.discovery-group.refresh-timeout">
- <link linkend="clusters.discovery-groups">discovery-group.refresh-timeout</link>
+ <link linkend="clusters">discovery-group.refresh-timeout</link>
</entry>
<entry>Integer</entry>
<entry>Period the discovery group
@@ -821,28 +820,28 @@
<entry>null</entry>
</row>
<row>
- <entry><link linkend="clusters.cluster-connections"
+ <entry><link linkend="clusters"
>cluster-connections</link></entry>
<entry>ClusterConnection</entry>
<entry>a list of cluster connections</entry>
<entry/>
</row>
<row>
- <entry><link linkend="clusters.cluster-connections"
+ <entry><link linkend="clusters"
>cluster-connections.name (attribute)</link></entry>
<entry>String</entry>
<entry>unique name for this cluster connection</entry>
<entry/>
</row>
<row>
- <entry><link linkend="clusters.cluster-connections"
+ <entry><link linkend="clusters"
>cluster-connections.address</link></entry>
<entry>String</entry>
<entry>name of address this cluster connection applies to</entry>
<entry/>
</row>
<row>
- <entry><link linkend="clusters.cluster-connections"
+ <entry><link linkend="clusters"
>cluster-connections.forward-when-no-consumers</link></entry>
<entry>Boolean</entry>
<entry>should messages be load balanced if there are no matching
@@ -850,21 +849,21 @@
<entry>false</entry>
</row>
<row>
- <entry><link linkend="clusters.cluster-connections"
+ <entry><link linkend="clusters"
>cluster-connections.max-hops</link></entry>
<entry>Integer</entry>
<entry>maximum number of hops cluster topology is propagated</entry>
<entry>1</entry>
</row>
<row>
- <entry><link linkend="clusters.cluster-connections"
+ <entry><link linkend="clusters"
>cluster-connections.retry-interval</link></entry>
<entry>Long</entry>
<entry>period (in ms) between successive retries</entry>
<entry>2000</entry>
</row>
<row>
- <entry><link linkend="clusters.cluster-connections"
+ <entry><link linkend="clusters"
>cluster-connections.use-duplicate-detection</link></entry>
<entry>Boolean</entry>
<entry>should duplicate detection headers be inserted in forwarded
@@ -872,14 +871,14 @@
<entry>true</entry>
</row>
<row>
- <entry><link linkend="clusters.cluster-connections"
+ <entry><link linkend="clusters"
>cluster-connections.discovery-group-ref</link></entry>
<entry>String</entry>
<entry>name of discovery group used by this bridge</entry>
<entry>null</entry>
</row>
<row>
- <entry><link linkend="clusters.cluster-connections"
+ <entry><link linkend="clusters"
>cluster-connections.connector-ref.connector-name
(attribute)</link></entry>
<entry>String</entry>
@@ -887,7 +886,7 @@
<entry/>
</row>
<row>
- <entry><link linkend="clusters.cluster-connections"
+ <entry><link linkend="clusters"
>cluster-connections.connector-ref.backup-connector-name
(attribute)</link></entry>
<entry>String</entry>
@@ -991,7 +990,7 @@
<entry>-1</entry>
</row>
<row>
- <entry><link linkend="clusters.message-redistribution"
+ <entry><link linkend="clusters"
>address-settings.redistribution-delay</link></entry>
<entry>Long</entry>
<entry>how long (in ms) to wait after the last consumer is closed on a
@@ -1068,14 +1067,14 @@
<entry>false</entry>
</row>
<row>
- <entry><link linkend="clusters.static.servers">connection-factory.connectors</link>
+ <entry><link linkend="clusters">connection-factory.connectors</link>
</entry>
<entry>String</entry>
<entry>A list of connectors used by the connection factory</entry>
<entry />
</row>
<row>
- <entry><link linkend="clusters.static.servers"
+ <entry><link linkend="clusters"
>connection-factory.connectors.connector-ref.connector-name (attribute)</link>
</entry>
<entry>String</entry>
@@ -1083,7 +1082,7 @@
<entry />
</row>
<row>
- <entry><link linkend="clusters.static.servers"
+ <entry><link linkend="clusters"
>connection-factory.connectors.connector-ref.backup-connector-name (attribute)</link>
</entry>
<entry>String</entry>
@@ -1091,7 +1090,7 @@
<entry />
</row>
<row>
- <entry><link linkend="clusters-discovery.groups.clientside"
+ <entry><link linkend="clusters"
>connection-factory.discovery-group-ref.discovery-group-name (attribute)</link>
</entry>
<entry>String</entry>
@@ -1100,7 +1099,7 @@
</row>
<row>
<entry id="configuration.connection-factory.discovery-initial-wait-timeout">
- <link linkend="clusters-discovery.groups.clientside"
+ <link linkend="clusters"
>connection-factory.discovery-initial-wait-timeout</link>
</entry>
<entry>Long</entry>
@@ -1158,7 +1157,7 @@
</row>
<row>
<entry id="configuration.connection-factory.connection-load-balancing-policy-class-name">
- <link linkend="clusters.client.loadbalancing">
+ <link linkend="clusters">
connection-factory.connection-load-balancing-policy-class-name</link>
</entry>
<entry>String</entry>
@@ -1218,7 +1217,7 @@
<entry>100 * 1024</entry>
</row>
<row>
- <entry><link linkend="large-messages.cache.client"
+ <entry><link linkend="clusters"
>connection-factory.cache-large-message-client</link></entry>
<entry>Boolean</entry>
<entry>If true clients using this connection factory will hold the large
Modified: trunk/docs/user-manual/en/ha.xml
===================================================================
--- trunk/docs/user-manual/en/ha.xml 2011-03-29 17:18:19 UTC (rev 10410)
+++ trunk/docs/user-manual/en/ha.xml 2011-03-30 00:37:06 UTC (rev 10411)
@@ -170,9 +170,9 @@
number of different ways. They can be configured explicitly or probably the most
common way of doing this is to use <emphasis>server discovery</emphasis> for the
client to automatically discover the list. For full details on how to configure
- server discovery, please see <xref linkend="clusters.server-discovery"/>.
+ server discovery, please see <xref linkend="clusters"/>.
Alternatively, the clients can explicitly connect to a specific server and download
- the current servers and backups see <xref linkend="clusters.static.servers"/>.</para>
+ the current servers and backups see <xref linkend="clusters"/>.</para>
<para>To enable automatic client failover, the client must be configured to allow
non-zero reconnection attempts (as explained in <xref linkend="client-reconnection"
/>).</para>
Modified: trunk/docs/user-manual/en/management.xml
===================================================================
--- trunk/docs/user-manual/en/management.xml 2011-03-29 17:18:19 UTC (rev 10410)
+++ trunk/docs/user-manual/en/management.xml 2011-03-30 00:37:06 UTC (rev 10411)
@@ -304,7 +304,7 @@
>core.broadcastgroup.<the broadcast group name></literal>). Broadcast
groups parameters can be retrieved using the <literal
>BroadcastGroupControl</literal> attributes (see <xref
- linkend="clusters.broadcast-groups"/>)</para>
+ linkend="clusters"/>)</para>
</listitem>
<listitem>
<para>Discovery groups</para>
@@ -315,7 +315,7 @@
name>"</literal> or the resource name <literal>core.discovery.<the
discovery group name></literal>). Discovery groups parameters can be
retrieved using the <literal>DiscoveryGroupControl</literal> attributes (see
- <xref linkend="clusters.discovery-groups"/>)</para>
+ <xref linkend="clusters"/>)</para>
</listitem>
<listitem>
<para>Cluster connections</para>
@@ -327,7 +327,7 @@
>core.clusterconnection.<the cluster connection name></literal>).
Cluster connections parameters can be retrieved using the <literal
>ClusterConnectionControl</literal> attributes (see <xref
- linkend="clusters.cluster-connections"/>)</para>
+ linkend="clusters"/>)</para>
</listitem>
</itemizedlist>
</section>
Modified: trunk/docs/user-manual/en/queue-attributes.xml
===================================================================
--- trunk/docs/user-manual/en/queue-attributes.xml 2011-03-29 17:18:19 UTC (rev 10410)
+++ trunk/docs/user-manual/en/queue-attributes.xml 2011-03-30 00:37:06 UTC (rev 10411)
@@ -132,7 +132,7 @@
set paging on an address. This is explained <link linkend="paging">here</link>.</para>
<para><literal>redistribution-delay</literal> defines how long to wait when the last
consumer is closed on a queue before redistributing any messages. see <link
- linkend="clusters.message-redistribution">here</link>.</para>
+ linkend="clusters">here</link>.</para>
<para><literal>send-to-dla-on-no-route</literal>. If a message is sent to an address, but the server does not route it to any queues,
for example, there might be no queues bound to that address, or none of the queues have filters that match, then normally that message
would be discarded. However if this parameter is set to true for that address, if the message is not routed to any queues it will instead
Modified: trunk/docs/user-manual/en/using-core.xml
===================================================================
--- trunk/docs/user-manual/en/using-core.xml 2011-03-29 17:18:19 UTC (rev 10410)
+++ trunk/docs/user-manual/en/using-core.xml 2011-03-30 00:37:06 UTC (rev 10411)
@@ -16,11 +16,6 @@
<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
<!-- permitted by applicable law. -->
<!-- ============================================================================= -->
-
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "HornetQ_User_Manual.ent">
-%BOOK_ENTITIES;
-]>
<chapter id="using-core">
<title>Using Core</title>
<para>HornetQ core is a completely JMS-agnostic messaging system with its own non-JMS API. We
@@ -99,10 +94,10 @@
<para>In core, there is no concept of a Topic, Topic is a JMS only term. Instead, in
core, we just deal with <emphasis>addresses</emphasis> and
<emphasis>queues</emphasis>.</para>
- <para>For example, a JMS topic would be implemented by a single address to which many
- queues are bound. Each queue represents a subscription of the topic. A JMS Queue
- would be implemented as a single address to which one queue is bound - that
- queue represents the JMS queue.</para>
+ <para>For example, a JMS topic would be implemented by a single address to which
+ many queues are bound. Each queue represents a subscription of the topic. A JMS
+ Queue would be implemented as a single address to which one queue is bound -
+ that queue represents the JMS queue.</para>
</note>
</section>
<section>
@@ -124,17 +119,17 @@
<para>Clients use <literal>ServerLocator</literal> instances to create <literal
>ClientSessionFactory</literal> instances. <literal>ServerLocator</literal>
instances are used to locate servers and create connections to them. </para>
- <para>In JMS terms think of a <literal>ServerLocator</literal> in the same way you would a
- JMS Connection Factory</para>
- <para><literal>ServerLocator</literal> instances are created using the
- <literal>HornetQClient</literal> factory class.</para>
+ <para>In JMS terms think of a <literal>ServerLocator</literal> in the same way you would
+ a JMS Connection Factory</para>
+ <para><literal>ServerLocator</literal> instances are created using the <literal
+ >HornetQClient</literal> factory class.</para>
</section>
<section>
<title>ClientSessionFactory</title>
<para>Clients use <literal>ClientSessionFactory</literal> instances to create <literal
>ClientSession</literal> instances. <literal>ClientSessionFactory</literal>
instances are basically the connection to a server</para>
- <para> In JMS terms think of them as JMS Connections</para>
+ <para> In JMS terms think of them as JMS Connections</para>
<para><literal>ClientSessionFactory</literal> instances are created using the <literal
>ServerLocator</literal> class.</para>
</section>
@@ -176,11 +171,11 @@
</section>
<warning>
<para>Please note that ClientSession, ClientProducer and ClientConsumer instances are
- <emphasis>designed to be re-used</emphasis>.</para>
- <para>It's an anti-pattern to create new ClientSession, ClientProducer and ClientConsumer instances
- for each message you produce or consume. If you do this, your application will
- perform very poorly. This is discussed further in the section on performance tuning
- <xref linkend="perf-tuning"/>.</para>
+ <emphasis>designed to be re-used</emphasis>.</para>
+ <para>It's an anti-pattern to create new ClientSession, ClientProducer and
+ ClientConsumer instances for each message you produce or consume. If you do this,
+ your application will perform very poorly. This is discussed further in the section
+ on performance tuning <xref linkend="perf-tuning"/>.</para>
</warning>
</section>
<section>
13 years, 1 month
JBoss hornetq SVN: r10410 - in trunk: src/config/common and 1 other directory.
by do-not-reply@jboss.org
Author: ataylor
Date: 2011-03-29 13:18:19 -0400 (Tue, 29 Mar 2011)
New Revision: 10410
Modified:
trunk/docs/README.html
trunk/src/config/common/hornetq-version.properties
Log:
version and readme update
Modified: trunk/docs/README.html
===================================================================
--- trunk/docs/README.html 2011-03-29 11:58:35 UTC (rev 10409)
+++ trunk/docs/README.html 2011-03-29 17:18:19 UTC (rev 10410)
@@ -7,18 +7,18 @@
</head>
<body>
-<h1>Release Notes - HornetQ - Version 2.1.2 Final</h1>
+<h1>Release Notes - HornetQ - Version 2.2.2 Final</h1>
<br>
<h2>17th Aug 2010</h2>
-These are the release notes for HornetQ 2.1.2 Final<br><br>
+These are the release notes for HornetQ 2.2.2 Final<br><br>
For full description of the contents please see the
-<a href="https://jira.jboss.org/secure/ReleaseNote.jspa?atl_token=09f0HuW8mF&versi...">HornetQ project JIRA</a>.<br><br>
+<a href="https://issues.jboss.org/secure/ReleaseNote.jspa?projectId=12310830&versi...">HornetQ project JIRA</a>.<br><br>
-This release contains minor fixes required for the Application Server integration, and we have also fixed a few journal bugs improving the stability for persistent messages.
+This release High availability improvements, A RESTful messaging interface and a twitter bridge amongst other things.
<br>
Modified: trunk/src/config/common/hornetq-version.properties
===================================================================
--- trunk/src/config/common/hornetq-version.properties 2011-03-29 11:58:35 UTC (rev 10409)
+++ trunk/src/config/common/hornetq-version.properties 2011-03-29 17:18:19 UTC (rev 10410)
@@ -3,7 +3,7 @@
hornetq.version.minorVersion=2
hornetq.version.microVersion=2
hornetq.version.incrementingVersion=122
-hornetq.version.versionSuffix=CR1
-hornetq.version.versionTag=CR1
+hornetq.version.versionSuffix=Final
+hornetq.version.versionTag=Final
hornetq.netty.version=(a)NETTY.VERSION@
hornetq.version.compatibleVersionList=121,122
13 years, 1 month
JBoss hornetq SVN: r10409 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/settings/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-29 07:58:35 -0400 (Tue, 29 Mar 2011)
New Revision: 10409
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java
Log:
Removing mistakenly added log
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java 2011-03-29 11:54:45 UTC (rev 10408)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java 2011-03-29 11:58:35 UTC (rev 10409)
@@ -180,7 +180,6 @@
*/
public void removeMatch(final String match)
{
- new Exception("Removing match " + match).printStackTrace();
boolean isImmutable = immutables.contains(match);
if (isImmutable)
{
13 years, 1 month
JBoss hornetq SVN: r10408 - in trunk: src/main/org/hornetq/core/settings/impl and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-03-29 07:54:45 -0400 (Tue, 29 Mar 2011)
New Revision: 10408
Modified:
trunk/docs/eap-manual/en/clusters.xml
trunk/src/main/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java
Log:
Removing mistakenly added log
Modified: trunk/docs/eap-manual/en/clusters.xml
===================================================================
--- trunk/docs/eap-manual/en/clusters.xml 2011-03-29 11:52:33 UTC (rev 10407)
+++ trunk/docs/eap-manual/en/clusters.xml 2011-03-29 11:54:45 UTC (rev 10408)
@@ -284,101 +284,104 @@
and configure it like so:
</para>
<programlisting>
- <configuration xmlns="urn:hornetq"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+ <configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
- <jmx-domain>org.hornetq.backup1</jmx-domain>
+ <jmx-domain>org.hornetq.backup1</jmx-domain>
- <clustered>true</clustered>
+ <clustered>true</clustered>
- <backup>true</backup>
+ <backup>true</backup>
- <shared-store>true</shared-store>
+ <shared-store>true</shared-store>
- <allow-failback>true</allow-failback>
+ <allow-failback>true</allow-failback>
- <log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
+ <log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
- <bindings-directory>/media/shared/data/hornetq-backup/bindings</bindings-directory>
+ <bindings-directory>/media/shared/data/hornetq-backup/bindings</bindings-directory>
- <journal-directory>/media/shared/data/hornetq-backup/journal</journal-directory>
+ <journal-directory>/media/shared/data/hornetq-backup/journal</journal-directory>
- <journal-min-files>10</journal-min-files>
+ <journal-min-files>10</journal-min-files>
- <large-messages-directory>/media/shared/data/hornetq-backup/largemessages</large-messages-directory>
+ <large-messages-directory>/media/shared/data/hornetq-backup/largemessages</large-messages-directory>
- <paging-directory>/media/shared/data/hornetq-backup/paging</paging-directory>
+ <paging-directory>/media/shared/data/hornetq-backup/paging</paging-directory>
- <connectors>
- <connector name="netty-connector">
- <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
- <param key="host" value="${jboss.bind.address:localhost}"/>
- <param key="port" value="${hornetq.remoting.backup.netty.port:5446}"/>
- </connector>
+ <connectors>
+ <connector name="netty-connector">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.backup.netty.port:5446}"/>
+ </connector>
- <connector name="in-vm">
- <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
- <param key="server-id" value="${hornetq.server-id:0}"/>
- </connector>
+ <connector name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ <param key="server-id" value="${hornetq.server-id:0}"/>
+ </connector>
- </connectors>
+ </connectors>
- <acceptors>
- <acceptor name="netty">
- <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
- <param key="host" value="${jboss.bind.address:localhost}"/>
- <param key="port" value="${hornetq.remoting.backup.netty.port:5446}"/>
- </acceptor>
- </acceptors>
+ <acceptors>
+ <acceptor name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.backup.netty.port:5446}"/>
+ </acceptor>
+ </acceptors>
- <broadcast-groups>
- <broadcast-group name="bg-group1">
- <group-address>231.7.7.7</group-address>
- <group-port>9876</group-port>
- <broadcast-period>1000</broadcast-period>
- <connector-ref>netty-connector</connector-ref>
- </broadcast-group>
- </broadcast-groups>
+ <broadcast-groups>
+ <broadcast-group name="bg-group1">
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <broadcast-period>1000</broadcast-period>
+ <connector-ref>netty-connector</connector-ref>
+ </broadcast-group>
+ </broadcast-groups>
- <discovery-groups>
- <discovery-group name="dg-group1">
- <group-address>231.7.7.7</group-address>
- <group-port>9876</group-port>
- <refresh-timeout>60000</refresh-timeout>
- </discovery-group>
- </discovery-groups>
+ <discovery-groups>
+ <discovery-group name="dg-group1">
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <refresh-timeout>60000</refresh-timeout>
+ </discovery-group>
+ </discovery-groups>
- <cluster-connections>
- <cluster-connection name="my-cluster">
- <address>jms</address>
- <connector-ref>netty-connector</connector-ref>
- <discovery-group-ref discovery-group-name="dg-group1"/>
- </cluster-connection>
- </cluster-connections>
+ <cluster-connections>
+ <cluster-connection name="my-cluster">
+ <address>jms</address>
+ <connector-ref>netty-connector</connector-ref>
+ <discovery-group-ref discovery-group-name="dg-group1"/>
+ <!--max hops defines how messages are redistributed, the default is 1 meaning only distribute to directly
+ connected nodes, to disable set to 0-->
+ <!--<max-hops>0</max-hops>-->
+ </cluster-connection>
+ </cluster-connections>
- <security-settings>
- <security-setting match="#">
- <permission type="createNonDurableQueue" roles="guest"/>
- <permission type="deleteNonDurableQueue" roles="guest"/>
- <permission type="consume" roles="guest"/>
- <permission type="send" roles="guest"/>
- </security-setting>
- </security-settings>
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ </security-setting>
+ </security-settings>
- <address-settings>
- <!--default for catch all-->
- <address-setting match="#">
- <dead-letter-address>jms.queue.DLQ</dead-letter-address>
- <expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>0</redelivery-delay>
- <max-size-bytes>10485760</max-size-bytes>
- <message-counter-history-day-limit>10</message-counter-history-day-limit>
- <address-full-policy>BLOCK</address-full-policy>
- </address-setting>
- </address-settings>
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>10485760</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>BLOCK</address-full-policy>
+ </address-setting>
+ </address-settings>
- </configuration>
+ </configuration>
</programlisting>
<para>
Modified: trunk/src/main/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java
===================================================================
--- trunk/src/main/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java 2011-03-29 11:52:33 UTC (rev 10407)
+++ trunk/src/main/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java 2011-03-29 11:54:45 UTC (rev 10408)
@@ -180,7 +180,6 @@
*/
public void removeMatch(final String match)
{
- new Exception("Removing match " + match).printStackTrace();
boolean isImmutable = immutables.contains(match);
if (isImmutable)
{
13 years, 1 month