back-porting fix on exception message from hornetq code

This is such a small change that qualifies as a tweak, so I'm not bothering on creating a JIRA for this
This commit is contained in:
Clebert Suconic 2015-02-11 21:04:18 -05:00
parent 60179cfc98
commit bace921389
1 changed files with 2 additions and 2 deletions

View File

@ -767,7 +767,7 @@ public class ActiveMQSession implements QueueSession, TopicSession
if (subscriptionName == null)
{
if (durability != ConsumerDurability.NON_DURABLE)
throw new RuntimeException();
throw new RuntimeException("Subscription name cannot be null for durable topic consumer");
// Non durable sub
queueName = new SimpleString(UUID.randomUUID().toString());
@ -782,7 +782,7 @@ public class ActiveMQSession implements QueueSession, TopicSession
{
// Durable sub
if (durability != ConsumerDurability.DURABLE)
throw new RuntimeException();
throw new RuntimeException("Subscription name must be null for non-durable topic consumer");
if (connection.getClientID() == null)
{
throw new IllegalStateException("Cannot create durable subscription - client ID has not been set");