ACTIVEMQ6-97 - Change HQ to AMQ for properties/headers/doc. Remove as much HQ as possible and change to AMQ to make this close to the ActiveMQ project.
This commit is contained in:
parent
db5fd9ddd9
commit
188e3b76bd
|
@ -52,7 +52,7 @@ import static org.apache.activemq.utils.DataConstants.STRING;
|
|||
public final class TypedProperties
|
||||
{
|
||||
|
||||
private static final SimpleString HQ_PROPNAME = new SimpleString("_HQ_");
|
||||
private static final SimpleString AMQ_PROPNAME = new SimpleString("_AMQ_");
|
||||
|
||||
private Map<SimpleString, PropertyValue> properties;
|
||||
|
||||
|
@ -630,7 +630,7 @@ public final class TypedProperties
|
|||
{
|
||||
sb.append("[" + ByteUtil.maxString(ByteUtil.bytesToHex((byte [])theValue, 2), 150) + ")");
|
||||
|
||||
if (iterItem.getKey().toString().startsWith("_HQ_ROUTE_TO"))
|
||||
if (iterItem.getKey().toString().startsWith("_AMQ_ROUTE_TO"))
|
||||
{
|
||||
sb.append(",bytesAsLongs(");
|
||||
try
|
||||
|
@ -681,7 +681,7 @@ public final class TypedProperties
|
|||
|
||||
private synchronized void doPutValue(final SimpleString key, final PropertyValue value)
|
||||
{
|
||||
if (key.startsWith(HQ_PROPNAME))
|
||||
if (key.startsWith(AMQ_PROPNAME))
|
||||
{
|
||||
internalProperties = true;
|
||||
}
|
||||
|
|
|
@ -25,17 +25,17 @@ public final class FilterConstants
|
|||
/**
|
||||
* Name of the ActiveMQ UserID header.
|
||||
*/
|
||||
public static final SimpleString ACTIVEMQ_USERID = new SimpleString("HQUserID");
|
||||
public static final SimpleString ACTIVEMQ_USERID = new SimpleString("AMQUserID");
|
||||
|
||||
/**
|
||||
* Name of the ActiveMQ Message expiration header.
|
||||
*/
|
||||
public static final SimpleString ACTIVEMQ_EXPIRATION = new SimpleString("HQExpiration");
|
||||
public static final SimpleString ACTIVEMQ_EXPIRATION = new SimpleString("AMQExpiration");
|
||||
|
||||
/**
|
||||
* Name of the ActiveMQ Message durable header.
|
||||
*/
|
||||
public static final SimpleString ACTIVEMQ_DURABLE = new SimpleString("HQDurable");
|
||||
public static final SimpleString ACTIVEMQ_DURABLE = new SimpleString("AMQDurable");
|
||||
|
||||
/**
|
||||
* Value for the Durable header when the message is non-durable.
|
||||
|
@ -50,22 +50,22 @@ public final class FilterConstants
|
|||
/**
|
||||
* Name of the ActiveMQ Message timestamp header.
|
||||
*/
|
||||
public static final SimpleString ACTIVEMQ_TIMESTAMP = new SimpleString("HQTimestamp");
|
||||
public static final SimpleString ACTIVEMQ_TIMESTAMP = new SimpleString("AMQTimestamp");
|
||||
|
||||
/**
|
||||
* Name of the ActiveMQ Message priority header.
|
||||
*/
|
||||
public static final SimpleString ACTIVEMQ_PRIORITY = new SimpleString("HQPriority");
|
||||
public static final SimpleString ACTIVEMQ_PRIORITY = new SimpleString("AMQPriority");
|
||||
|
||||
/**
|
||||
* Name of the ActiveMQ Message size header.
|
||||
*/
|
||||
public static final SimpleString ACTIVEMQ_SIZE = new SimpleString("HQSize");
|
||||
public static final SimpleString ACTIVEMQ_SIZE = new SimpleString("AMQSize");
|
||||
|
||||
/**
|
||||
* All ActiveMQ headers are prepended by this prefix.
|
||||
*/
|
||||
public static final SimpleString ACTIVEMQ_PREFIX = new SimpleString("HQ");
|
||||
public static final SimpleString ACTIVEMQ_PREFIX = new SimpleString("AMQ");
|
||||
|
||||
private FilterConstants()
|
||||
{
|
||||
|
|
|
@ -52,25 +52,25 @@ import org.apache.activemq.utils.UUID;
|
|||
*/
|
||||
public interface Message
|
||||
{
|
||||
SimpleString HDR_ACTUAL_EXPIRY_TIME = new SimpleString("_HQ_ACTUAL_EXPIRY");
|
||||
SimpleString HDR_ACTUAL_EXPIRY_TIME = new SimpleString("_AMQ_ACTUAL_EXPIRY");
|
||||
|
||||
SimpleString HDR_ORIGINAL_ADDRESS = new SimpleString("_HQ_ORIG_ADDRESS");
|
||||
SimpleString HDR_ORIGINAL_ADDRESS = new SimpleString("_AMQ_ORIG_ADDRESS");
|
||||
|
||||
SimpleString HDR_ORIGINAL_QUEUE = new SimpleString("_HQ_ORIG_QUEUE");
|
||||
SimpleString HDR_ORIGINAL_QUEUE = new SimpleString("_AMQ_ORIG_QUEUE");
|
||||
|
||||
SimpleString HDR_ORIG_MESSAGE_ID = new SimpleString("_HQ_ORIG_MESSAGE_ID");
|
||||
SimpleString HDR_ORIG_MESSAGE_ID = new SimpleString("_AMQ_ORIG_MESSAGE_ID");
|
||||
|
||||
SimpleString HDR_GROUP_ID = new SimpleString("_HQ_GROUP_ID");
|
||||
SimpleString HDR_GROUP_ID = new SimpleString("_AMQ_GROUP_ID");
|
||||
|
||||
SimpleString HDR_LARGE_COMPRESSED = new SimpleString("_HQ_LARGE_COMPRESSED");
|
||||
SimpleString HDR_LARGE_COMPRESSED = new SimpleString("_AMQ_LARGE_COMPRESSED");
|
||||
|
||||
SimpleString HDR_LARGE_BODY_SIZE = new SimpleString("_HQ_LARGE_SIZE");
|
||||
SimpleString HDR_LARGE_BODY_SIZE = new SimpleString("_AMQ_LARGE_SIZE");
|
||||
|
||||
SimpleString HDR_SCHEDULED_DELIVERY_TIME = new SimpleString("_HQ_SCHED_DELIVERY");
|
||||
SimpleString HDR_SCHEDULED_DELIVERY_TIME = new SimpleString("_AMQ_SCHED_DELIVERY");
|
||||
|
||||
SimpleString HDR_DUPLICATE_DETECTION_ID = new SimpleString("_HQ_DUPL_ID");
|
||||
SimpleString HDR_DUPLICATE_DETECTION_ID = new SimpleString("_AMQ_DUPL_ID");
|
||||
|
||||
SimpleString HDR_LAST_VALUE_NAME = new SimpleString("_HQ_LVQ_NAME");
|
||||
SimpleString HDR_LAST_VALUE_NAME = new SimpleString("_AMQ_LVQ_NAME");
|
||||
|
||||
byte DEFAULT_TYPE = 0;
|
||||
|
||||
|
|
|
@ -34,41 +34,41 @@ public final class ManagementHelper
|
|||
{
|
||||
// Constants -----------------------------------------------------
|
||||
|
||||
public static final SimpleString HDR_RESOURCE_NAME = new SimpleString("_HQ_ResourceName");
|
||||
public static final SimpleString HDR_RESOURCE_NAME = new SimpleString("_AMQ_ResourceName");
|
||||
|
||||
public static final SimpleString HDR_ATTRIBUTE = new SimpleString("_HQ_Attribute");
|
||||
public static final SimpleString HDR_ATTRIBUTE = new SimpleString("_AMQ_Attribute");
|
||||
|
||||
public static final SimpleString HDR_OPERATION_NAME = new SimpleString("_HQ_OperationName");
|
||||
public static final SimpleString HDR_OPERATION_NAME = new SimpleString("_AMQ_OperationName");
|
||||
|
||||
public static final SimpleString HDR_OPERATION_SUCCEEDED = new SimpleString("_HQ_OperationSucceeded");
|
||||
public static final SimpleString HDR_OPERATION_SUCCEEDED = new SimpleString("_AMQ_OperationSucceeded");
|
||||
|
||||
public static final SimpleString HDR_NOTIFICATION_TYPE = new SimpleString("_HQ_NotifType");
|
||||
public static final SimpleString HDR_NOTIFICATION_TYPE = new SimpleString("_AMQ_NotifType");
|
||||
|
||||
public static final SimpleString HDR_NOTIFICATION_TIMESTAMP = new SimpleString("_HQ_NotifTimestamp");
|
||||
public static final SimpleString HDR_NOTIFICATION_TIMESTAMP = new SimpleString("_AMQ_NotifTimestamp");
|
||||
|
||||
public static final SimpleString HDR_ROUTING_NAME = new SimpleString("_HQ_RoutingName");
|
||||
public static final SimpleString HDR_ROUTING_NAME = new SimpleString("_AMQ_RoutingName");
|
||||
|
||||
public static final SimpleString HDR_CLUSTER_NAME = new SimpleString("_HQ_ClusterName");
|
||||
public static final SimpleString HDR_CLUSTER_NAME = new SimpleString("_AMQ_ClusterName");
|
||||
|
||||
public static final SimpleString HDR_ADDRESS = new SimpleString("_HQ_Address");
|
||||
public static final SimpleString HDR_ADDRESS = new SimpleString("_AMQ_Address");
|
||||
|
||||
public static final SimpleString HDR_BINDING_ID = new SimpleString("_HQ_Binding_ID");
|
||||
public static final SimpleString HDR_BINDING_ID = new SimpleString("_AMQ_Binding_ID");
|
||||
|
||||
public static final SimpleString HDR_BINDING_TYPE = new SimpleString("_HQ_Binding_Type");
|
||||
public static final SimpleString HDR_BINDING_TYPE = new SimpleString("_AMQ_Binding_Type");
|
||||
|
||||
public static final SimpleString HDR_FILTERSTRING = new SimpleString("_HQ_FilterString");
|
||||
public static final SimpleString HDR_FILTERSTRING = new SimpleString("_AMQ_FilterString");
|
||||
|
||||
public static final SimpleString HDR_DISTANCE = new SimpleString("_HQ_Distance");
|
||||
public static final SimpleString HDR_DISTANCE = new SimpleString("_AMQ_Distance");
|
||||
|
||||
public static final SimpleString HDR_CONSUMER_COUNT = new SimpleString("_HQ_ConsumerCount");
|
||||
public static final SimpleString HDR_CONSUMER_COUNT = new SimpleString("_AMQ_ConsumerCount");
|
||||
|
||||
public static final SimpleString HDR_USER = new SimpleString("_HQ_User");
|
||||
public static final SimpleString HDR_USER = new SimpleString("_AMQ_User");
|
||||
|
||||
public static final SimpleString HDR_CHECK_TYPE = new SimpleString("_HQ_CheckType");
|
||||
public static final SimpleString HDR_CHECK_TYPE = new SimpleString("_AMQ_CheckType");
|
||||
|
||||
public static final SimpleString HDR_SESSION_NAME = new SimpleString("_HQ_SessionName");
|
||||
public static final SimpleString HDR_SESSION_NAME = new SimpleString("_AMQ_SessionName");
|
||||
|
||||
public static final SimpleString HDR_REMOTE_ADDRESS = new SimpleString("_HQ_RemoteAddress");
|
||||
public static final SimpleString HDR_REMOTE_ADDRESS = new SimpleString("_AMQ_RemoteAddress");
|
||||
|
||||
public static final SimpleString HDR_PROPOSAL_GROUP_ID = new SimpleString("_JBM_ProposalGroupId");
|
||||
|
||||
|
@ -76,9 +76,9 @@ public final class ManagementHelper
|
|||
|
||||
public static final SimpleString HDR_PROPOSAL_ALT_VALUE = new SimpleString("_JBM_ProposalAltValue");
|
||||
|
||||
public static final SimpleString HDR_CONSUMER_NAME = new SimpleString("_HQ_ConsumerName");
|
||||
public static final SimpleString HDR_CONSUMER_NAME = new SimpleString("_AMQ_ConsumerName");
|
||||
|
||||
public static final SimpleString HDR_CONNECTION_NAME = new SimpleString("_HQ_ConnectionName");
|
||||
public static final SimpleString HDR_CONNECTION_NAME = new SimpleString("_AMQ_ConnectionName");
|
||||
|
||||
// Attributes ----------------------------------------------------
|
||||
|
||||
|
|
|
@ -42,14 +42,14 @@ import org.apache.activemq.utils.UUID;
|
|||
*/
|
||||
public abstract class MessageImpl implements MessageInternal
|
||||
{
|
||||
public static final SimpleString HDR_ROUTE_TO_IDS = new SimpleString("_HQ_ROUTE_TO");
|
||||
public static final SimpleString HDR_ROUTE_TO_IDS = new SimpleString("_AMQ_ROUTE_TO");
|
||||
|
||||
public static final SimpleString HDR_SCALEDOWN_TO_IDS = new SimpleString("_HQ_SCALEDOWN_TO");
|
||||
public static final SimpleString HDR_SCALEDOWN_TO_IDS = new SimpleString("_AMQ_SCALEDOWN_TO");
|
||||
|
||||
public static final SimpleString HDR_ROUTE_TO_ACK_IDS = new SimpleString("_HQ_ACK_ROUTE_TO");
|
||||
public static final SimpleString HDR_ROUTE_TO_ACK_IDS = new SimpleString("_AMQ_ACK_ROUTE_TO");
|
||||
|
||||
// used by the bridges to set duplicates
|
||||
public static final SimpleString HDR_BRIDGE_DUPLICATE_ID = new SimpleString("_HQ_BRIDGE_DUP");
|
||||
public static final SimpleString HDR_BRIDGE_DUPLICATE_ID = new SimpleString("_AMQ_BRIDGE_DUP");
|
||||
|
||||
public static final int BUFFER_HEADER_SPACE = PacketImpl.PACKET_HEADERS_SIZE;
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ public class MessageUtil
|
|||
|
||||
public static final String JMSXGROUPID = "JMSXGroupID";
|
||||
|
||||
public static final SimpleString CONNECTION_ID_PROPERTY_NAME = new SimpleString("__HQ_CID");
|
||||
public static final SimpleString CONNECTION_ID_PROPERTY_NAME = new SimpleString("__AMQ_CID");
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -21,13 +21,13 @@ package org.apache.activemq.api.jms;
|
|||
*/
|
||||
public class ActiveMQJMSConstants
|
||||
{
|
||||
public static final String JMS_ACTIVEMQ_INPUT_STREAM = "JMS_HQ_InputStream";
|
||||
public static final String JMS_ACTIVEMQ_INPUT_STREAM = "JMS_AMQ_InputStream";
|
||||
|
||||
public static final String JMS_ACTIVEMQ_OUTPUT_STREAM = "JMS_HQ_OutputStream";
|
||||
public static final String JMS_ACTIVEMQ_OUTPUT_STREAM = "JMS_AMQ_OutputStream";
|
||||
|
||||
public static final String JMS_ACTIVEMQ_SAVE_STREAM = "JMS_HQ_SaveStream";
|
||||
public static final String JMS_ACTIVEMQ_SAVE_STREAM = "JMS_AMQ_SaveStream";
|
||||
|
||||
public static final String JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST = "HQ_BRIDGE_MSG_ID_LIST";
|
||||
public static final String AMQ_MESSAGING_BRIDGE_MESSAGE_ID_LIST = "AMQ_BRIDGE_MSG_ID_LIST";
|
||||
|
||||
public static final int PRE_ACKNOWLEDGE = 100;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public class ActiveMQSession implements QueueSession, TopicSession
|
|||
|
||||
public static final int TYPE_TOPIC_SESSION = 2;
|
||||
|
||||
private static SimpleString REJECTING_FILTER = new SimpleString("_HQX=-1");
|
||||
private static SimpleString REJECTING_FILTER = new SimpleString("_AMQX=-1");
|
||||
|
||||
private final ActiveMQConnection connection;
|
||||
|
||||
|
|
|
@ -44,13 +44,13 @@ public class SelectorTranslator
|
|||
|
||||
// First convert any JMS header identifiers
|
||||
|
||||
String filterString = SelectorTranslator.parse(selectorString, "JMSDeliveryMode", "HQDurable");
|
||||
String filterString = SelectorTranslator.parse(selectorString, "JMSDeliveryMode", "AMQDurable");
|
||||
filterString = SelectorTranslator.parse(filterString, "'PERSISTENT'", "'DURABLE'");
|
||||
filterString = SelectorTranslator.parse(filterString, "'NON_PERSISTENT'", "'NON_DURABLE'");
|
||||
filterString = SelectorTranslator.parse(filterString, "JMSPriority", "HQPriority");
|
||||
filterString = SelectorTranslator.parse(filterString, "JMSTimestamp", "HQTimestamp");
|
||||
filterString = SelectorTranslator.parse(filterString, "JMSMessageID", "HQUserID");
|
||||
filterString = SelectorTranslator.parse(filterString, "JMSExpiration", "HQExpiration");
|
||||
filterString = SelectorTranslator.parse(filterString, "JMSPriority", "AMQPriority");
|
||||
filterString = SelectorTranslator.parse(filterString, "JMSTimestamp", "AMQTimestamp");
|
||||
filterString = SelectorTranslator.parse(filterString, "JMSMessageID", "AMQUserID");
|
||||
filterString = SelectorTranslator.parse(filterString, "JMSExpiration", "AMQExpiration");
|
||||
|
||||
return filterString;
|
||||
|
||||
|
|
|
@ -1785,7 +1785,7 @@ public final class JMSBridgeImpl implements JMSBridge
|
|||
|
||||
String val = null;
|
||||
|
||||
val = msg.getStringProperty(ActiveMQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST);
|
||||
val = msg.getStringProperty(ActiveMQJMSConstants.AMQ_MESSAGING_BRIDGE_MESSAGE_ID_LIST);
|
||||
|
||||
if (val == null)
|
||||
{
|
||||
|
@ -1800,7 +1800,7 @@ public final class JMSBridgeImpl implements JMSBridge
|
|||
val = sb.toString();
|
||||
}
|
||||
|
||||
msg.setStringProperty(ActiveMQJMSConstants.JBOSS_MESSAGING_BRIDGE_MESSAGE_ID_LIST, val);
|
||||
msg.setStringProperty(ActiveMQJMSConstants.AMQ_MESSAGING_BRIDGE_MESSAGE_ID_LIST, val);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -763,7 +763,7 @@ public class OpenWireMessageConverter implements MessageConverter
|
|||
for (SimpleString s : props)
|
||||
{
|
||||
String keyStr = s.toString();
|
||||
if (keyStr.startsWith("__HQ") || keyStr.startsWith("__HDR_"))
|
||||
if (keyStr.startsWith("__AMQ") || keyStr.startsWith("__HDR_"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessa
|
|||
|
||||
public final class StompConnection implements RemotingConnection
|
||||
{
|
||||
protected static final String CONNECTION_ID_PROP = "__HQ_CID";
|
||||
protected static final String CONNECTION_ID_PROP = "__AMQ_CID";
|
||||
private static final String SERVER_NAME = "ActiveMQ/" + VersionLoader.getVersion().getFullVersion() +
|
||||
" ActiveMQ Messaging Engine";
|
||||
|
||||
|
@ -633,7 +633,7 @@ public final class StompConnection implements RemotingConnection
|
|||
}
|
||||
if (enableMessageID())
|
||||
{
|
||||
message.putStringProperty("hqMessageId",
|
||||
message.putStringProperty("amqMessageId",
|
||||
"STOMP" + message.getMessageID());
|
||||
}
|
||||
try
|
||||
|
|
|
@ -72,7 +72,7 @@ public class TopicDestinationsResource
|
|||
ClientSession.QueueQuery query = session.queueQuery(new SimpleString(topicName));
|
||||
if (!query.isExists())
|
||||
{
|
||||
session.createQueue(topicName, topicName, "__HQX=-1", true);
|
||||
session.createQueue(topicName, topicName, "__AMQX=-1", true);
|
||||
|
||||
}
|
||||
else
|
||||
|
|
|
@ -35,12 +35,12 @@ import org.apache.activemq.core.server.ServerMessage;
|
|||
*
|
||||
* Valid identifiers that can be used are:
|
||||
*
|
||||
* HQPriority - the priority of the message
|
||||
* HQTimestamp - the timestamp of the message
|
||||
* HQDurable - "DURABLE" or "NON_DURABLE"
|
||||
* HQExpiration - the expiration of the message
|
||||
* HQSize - the encoded size of the full message in bytes
|
||||
* HQUserID - the user specified ID string (if any)
|
||||
* AMQPriority - the priority of the message
|
||||
* AMQTimestamp - the timestamp of the message
|
||||
* AMQDurable - "DURABLE" or "NON_DURABLE"
|
||||
* AMQExpiration - the expiration of the message
|
||||
* AMQSize - the encoded size of the full message in bytes
|
||||
* AMQUserID - the user specified ID string (if any)
|
||||
* Any other identifiers that appear in a filter expression represent header values for the message
|
||||
*
|
||||
* String values must be set as <code>SimpleString</code>, not <code>java.lang.String</code> (see JBMESSAGING-1307).
|
||||
|
|
|
@ -85,9 +85,9 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding
|
|||
{
|
||||
private static final boolean isTrace = ActiveMQServerLogger.LOGGER.isTraceEnabled();
|
||||
|
||||
public static final SimpleString HDR_RESET_QUEUE_DATA = new SimpleString("_HQ_RESET_QUEUE_DATA");
|
||||
public static final SimpleString HDR_RESET_QUEUE_DATA = new SimpleString("_AMQ_RESET_QUEUE_DATA");
|
||||
|
||||
public static final SimpleString HDR_RESET_QUEUE_DATA_COMPLETE = new SimpleString("_HQ_RESET_QUEUE_DATA_COMPLETE");
|
||||
public static final SimpleString HDR_RESET_QUEUE_DATA_COMPLETE = new SimpleString("_AMQ_RESET_QUEUE_DATA_COMPLETE");
|
||||
|
||||
public static final SimpleString BRIDGE_CACHE_STR = new SimpleString("BRIDGE.");
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public interface ServerMessage extends MessageInternal, EncodingSupport
|
|||
|
||||
PagingStore getPagingStore();
|
||||
|
||||
// Is there any _HQ_ property being used
|
||||
// Is there any _AMQ_ property being used
|
||||
boolean hasInternalProperties();
|
||||
|
||||
boolean storeIsPaging();
|
||||
|
|
|
@ -144,7 +144,7 @@ public class ActiveMQServerImpl implements ActiveMQServer
|
|||
* any other component on the system, and just be ignored for any purpose It's declared here as
|
||||
* this filter is considered a global ignore
|
||||
*/
|
||||
public static final String GENERIC_IGNORED_FILTER = "__HQX=-1";
|
||||
public static final String GENERIC_IGNORED_FILTER = "__AMQX=-1";
|
||||
|
||||
private HAPolicy haPolicy;
|
||||
|
||||
|
|
|
@ -282,8 +282,8 @@ public class ScaleDownHandler
|
|||
Message message = messageRef.getMessage().copy();
|
||||
|
||||
/* Here we are taking messages out of a store-and-forward queue and sending them to the corresponding
|
||||
* address on the scale-down target server. However, we have to take the existing _HQ_ROUTE_TOsf.*
|
||||
* property and put its value into the _HQ_ROUTE_TO property so the message is routed properly.
|
||||
* address on the scale-down target server. However, we have to take the existing _AMQ_ROUTE_TOsf.*
|
||||
* property and put its value into the _AMQ_ROUTE_TO property so the message is routed properly.
|
||||
*/
|
||||
|
||||
byte[] oldRouteToIDs = null;
|
||||
|
|
|
@ -86,9 +86,9 @@ public class FilterTest extends SilentTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testHQDurable() throws Exception
|
||||
public void testAMQDurable() throws Exception
|
||||
{
|
||||
filter = FilterImpl.createFilter(new SimpleString("HQDurable='DURABLE'"));
|
||||
filter = FilterImpl.createFilter(new SimpleString("AMQDurable='DURABLE'"));
|
||||
|
||||
message.setDurable(true);
|
||||
|
||||
|
@ -98,7 +98,7 @@ public class FilterTest extends SilentTestCase
|
|||
|
||||
Assert.assertFalse(filter.match(message));
|
||||
|
||||
filter = FilterImpl.createFilter(new SimpleString("HQDurable='NON_DURABLE'"));
|
||||
filter = FilterImpl.createFilter(new SimpleString("AMQDurable='NON_DURABLE'"));
|
||||
|
||||
message = new ServerMessageImpl();
|
||||
message.setDurable(true);
|
||||
|
@ -112,17 +112,17 @@ public class FilterTest extends SilentTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testHQSize() throws Exception
|
||||
public void testAMQSize() throws Exception
|
||||
{
|
||||
message.setAddress(RandomUtil.randomSimpleString());
|
||||
|
||||
int encodeSize = message.getEncodeSize();
|
||||
|
||||
Filter moreThanSmall = FilterImpl.createFilter(new SimpleString("HQSize > " + (encodeSize - 1)));
|
||||
Filter lessThanLarge = FilterImpl.createFilter(new SimpleString("HQSize < " + (encodeSize + 1)));
|
||||
Filter moreThanSmall = FilterImpl.createFilter(new SimpleString("AMQSize > " + (encodeSize - 1)));
|
||||
Filter lessThanLarge = FilterImpl.createFilter(new SimpleString("AMQSize < " + (encodeSize + 1)));
|
||||
|
||||
Filter lessThanSmall = FilterImpl.createFilter(new SimpleString("HQSize < " + encodeSize));
|
||||
Filter moreThanLarge = FilterImpl.createFilter(new SimpleString("HQSize > " + encodeSize));
|
||||
Filter lessThanSmall = FilterImpl.createFilter(new SimpleString("AMQSize < " + encodeSize));
|
||||
Filter moreThanLarge = FilterImpl.createFilter(new SimpleString("AMQSize > " + encodeSize));
|
||||
|
||||
Assert.assertTrue(moreThanSmall.match(message));
|
||||
Assert.assertTrue(lessThanLarge.match(message));
|
||||
|
@ -133,9 +133,9 @@ public class FilterTest extends SilentTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testHQPriority() throws Exception
|
||||
public void testAMQPriority() throws Exception
|
||||
{
|
||||
filter = FilterImpl.createFilter(new SimpleString("HQPriority=3"));
|
||||
filter = FilterImpl.createFilter(new SimpleString("AMQPriority=3"));
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
|
@ -153,9 +153,9 @@ public class FilterTest extends SilentTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testHQTimestamp() throws Exception
|
||||
public void testAMQTimestamp() throws Exception
|
||||
{
|
||||
filter = FilterImpl.createFilter(new SimpleString("HQTimestamp=12345678"));
|
||||
filter = FilterImpl.createFilter(new SimpleString("AMQTimestamp=12345678"));
|
||||
|
||||
message.setTimestamp(87654321);
|
||||
|
||||
|
|
|
@ -149,16 +149,16 @@ public class TransferQueue // NO_UCD (unused code)
|
|||
|
||||
message.acknowledge();
|
||||
|
||||
if (!message.containsProperty("_HQ_TOOL_original_address"))
|
||||
if (!message.containsProperty("_AMQ_TOOL_original_address"))
|
||||
{
|
||||
message.putStringProperty("_HQ_TOOL_original_address", message.getAddress().toString());
|
||||
message.putStringProperty("_AMQ_TOOL_original_address", message.getAddress().toString());
|
||||
}
|
||||
|
||||
LinkedList<String> listToRemove = new LinkedList<String>();
|
||||
|
||||
for (SimpleString name : message.getPropertyNames())
|
||||
{
|
||||
if (name.toString().startsWith("_HQ_ROUTE_TO"))
|
||||
if (name.toString().startsWith("_AMQ_ROUTE_TO"))
|
||||
{
|
||||
listToRemove.add(name.toString());
|
||||
}
|
||||
|
|
|
@ -119,5 +119,5 @@ public final class XmlDataConstants
|
|||
|
||||
public static final String JNDI_COMPATIBILITY_PREFIX = "java:jboss/exported/";
|
||||
|
||||
static final String NULL = "_HQ_NULL";
|
||||
static final String NULL = "_AMQ_NULL";
|
||||
}
|
|
@ -83,27 +83,27 @@ Type the command `mvn verify` and you should see the following output:
|
|||
[INFO] --- activemq-maven-plugin:1.1.1-SNAPSHOT:start (start) @ activemq-jms-queue-example ---
|
||||
[file:/home/andy/projects/activemq-master/examples/jms/queue/target/classes/activemq/server0/]
|
||||
Apr 17, 2013 10:51:01 AM org.apache.activemq.core.deployers.impl.FileConfigurationParser parseMainConfig
|
||||
WARN: HQ222018: AIO was not located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
|
||||
WARN: AMQ222018: AIO was not located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
|
||||
Apr 17, 2013 10:51:01 AM org.apache.activemq.core.server.impl.ActiveMQServerImpl start
|
||||
INFO: HQ221000: live server is starting with configuration ActiveMQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=/home/andy/projects/activemq-master/examples/jms/queue/target//server0/data/messaging/journal,bindingsDirectory=/home/andy/projects/activemq-master/examples/jms/queue/target//server0/data/messaging/bindings,largeMessagesDirectory=/home/andy/projects/activemq-master/examples/jms/queue/target//server0/data/messaging/largemessages,pagingDirectory=/home/andy/projects/activemq-master/examples/jms/queue/target//server0/data/messaging/paging)
|
||||
INFO: AMQ221000: live server is starting with configuration ActiveMQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=/home/andy/projects/activemq-master/examples/jms/queue/target//server0/data/messaging/journal,bindingsDirectory=/home/andy/projects/activemq-master/examples/jms/queue/target//server0/data/messaging/bindings,largeMessagesDirectory=/home/andy/projects/activemq-master/examples/jms/queue/target//server0/data/messaging/largemessages,pagingDirectory=/home/andy/projects/activemq-master/examples/jms/queue/target//server0/data/messaging/paging)
|
||||
Apr 17, 2013 10:51:01 AM org.apache.activemq.core.server.impl.ActiveMQServerImpl$SharedStoreLiveActivation run
|
||||
INFO: HQ221006: Waiting to obtain live lock
|
||||
INFO: AMQ221006: Waiting to obtain live lock
|
||||
Apr 17, 2013 10:51:01 AM org.apache.activemq.core.persistence.impl.journal.JournalStorageManager <init>
|
||||
INFO: HQ221013: Using NIO Journal
|
||||
INFO: AMQ221013: Using NIO Journal
|
||||
Apr 17, 2013 10:51:01 AM org.apache.activemq.core.server.impl.ActiveMQServerImpl initialisePart1
|
||||
WARN: HQ222007: Security risk! ActiveMQ is running with the default cluster admin user and default password. Please see the ActiveMQ user guide, cluster chapter, for instructions on how to change this.
|
||||
WARN: AMQ222007: Security risk! ActiveMQ is running with the default cluster admin user and default password. Please see the ActiveMQ user guide, cluster chapter, for instructions on how to change this.
|
||||
Apr 17, 2013 10:51:01 AM org.apache.activemq.core.server.impl.FileLockNodeManager startLiveNode
|
||||
INFO: HQ221034: Waiting to obtain live lock
|
||||
INFO: AMQ221034: Waiting to obtain live lock
|
||||
Apr 17, 2013 10:51:01 AM org.apache.activemq.core.server.impl.FileLockNodeManager startLiveNode
|
||||
INFO: HQ221035: Live Server Obtained live lock
|
||||
INFO: AMQ221035: Live Server Obtained live lock
|
||||
Apr 17, 2013 10:51:02 AM org.apache.activemq.core.server.impl.ActiveMQServerImpl deployQueue
|
||||
INFO: HQ221003: trying to deploy queue jms.queue.exampleQueue
|
||||
INFO: AMQ221003: trying to deploy queue jms.queue.exampleQueue
|
||||
Apr 17, 2013 10:51:02 AM org.apache.activemq.core.remoting.impl.netty.NettyAcceptor start
|
||||
INFO: HQ221020: Started Netty Acceptor version 3.6.2.Final-c0d783c localhost:61616 for CORE protocol
|
||||
INFO: AMQ221020: Started Netty Acceptor version 3.6.2.Final-c0d783c localhost:61616 for CORE protocol
|
||||
Apr 17, 2013 10:51:02 AM org.apache.activemq.core.server.impl.ActiveMQServerImpl$SharedStoreLiveActivation run
|
||||
INFO: HQ221007: Server is now live
|
||||
INFO: AMQ221007: Server is now live
|
||||
Apr 17, 2013 10:51:02 AM org.apache.activemq.core.server.impl.ActiveMQServerImpl start
|
||||
INFO: HQ221001: ActiveMQ Server version 2.3.0.SNAPSHOT (black'n'yellow, 123) [a57893ff-7783-11e2-9787-07ca142fc9f7]
|
||||
INFO: AMQ221001: ActiveMQ Server version 2.3.0.SNAPSHOT (black'n'yellow, 123) [a57893ff-7783-11e2-9787-07ca142fc9f7]
|
||||
[INFO]
|
||||
[INFO] --- activemq-maven-plugin:1.1.1-SNAPSHOT:runClient (runClient) @ activemq-jms-queue-example ---
|
||||
Apr 17, 2013 10:51:02 AM org.apache.activemq.common.example.ActiveMQExample getContext
|
||||
|
@ -118,9 +118,9 @@ Type the command `mvn verify` and you should see the following output:
|
|||
[INFO]
|
||||
[INFO] --- activemq-maven-plugin:1.1.1-SNAPSHOT:stop (stop) @ activemq-jms-queue-example ---
|
||||
Apr 17, 2013 10:51:03 AM org.apache.activemq.core.server.management.impl.ManagementServiceImpl stop
|
||||
WARN: HQ222113: On ManagementService stop, there are 1 unexpected registered MBeans: [core.acceptor.netty-acceptor]
|
||||
WARN: AMQ222113: On ManagementService stop, there are 1 unexpected registered MBeans: [core.acceptor.netty-acceptor]
|
||||
Apr 17, 2013 10:51:03 AM org.apache.activemq.core.server.impl.ActiveMQServerImpl stop
|
||||
INFO: HQ221002: ActiveMQ Server version 2.3.0.SNAPSHOT (black'n'yellow, 123) [a57893ff-7783-11e2-9787-07ca142fc9f7] stopped
|
||||
INFO: AMQ221002: ActiveMQ Server version 2.3.0.SNAPSHOT (black'n'yellow, 123) [a57893ff-7783-11e2-9787-07ca142fc9f7] stopped
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
[INFO] BUILD SUCCESS
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
|
@ -233,7 +233,7 @@ In the shell window you should see something like the following output:
|
|||
10:58:08,790 INFO [org.apache.activemq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-11) Started Netty Acceptor version 3.2.5.Final-a96d88c localhost.localdomain:61616 for CORE protocol
|
||||
10:58:08,793 INFO [org.apache.activemq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-11) Started Netty Acceptor version 3.2.5.Final-a96d88c localhost.localdomain:5455 for CORE protocol
|
||||
10:58:08,795 INFO [org.apache.activemq.core.server.impl.ActiveMQServerImpl] (MSC service thread 1-11) Server is now live
|
||||
10:58:08,797 INFO [org.apache.activemq.core.server.impl.ActiveMQServerImpl] (MSC service thread 1-11) ActiveMQ Server version 2.2.13.Final (HQ_2_2_13_FINAL_AS7, 122) [5c499e88-9c63-11e2-bfa3-fe5400591699]) started
|
||||
10:58:08,797 INFO [org.apache.activemq.core.server.impl.ActiveMQServerImpl] (MSC service thread 1-11) ActiveMQ Server version 2.2.13.Final (AMQ_2_2_13_FINAL_AS7, 122) [5c499e88-9c63-11e2-bfa3-fe5400591699]) started
|
||||
10:58:08,822 INFO [org.jboss.as.messaging] (MSC service thread 1-4) JBAS011601: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory
|
||||
10:58:08,824 INFO [org.jboss.as.messaging] (MSC service thread 1-4) JBAS011601: Bound messaging object to jndi name java:/RemoteConnectionFactory
|
||||
10:58:08,825 INFO [org.jboss.as.messaging] (MSC service thread 1-10) JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory
|
||||
|
|
|
@ -64,7 +64,7 @@ ignore the entire transaction.
|
|||
|
||||
The name of the property that you set is given by the value of
|
||||
`org.apache.activemq.api.core.Message.HDR_DUPLICATE_DETECTION_ID`, which
|
||||
is `_HQ_DUPL_ID`
|
||||
is `_AMQ_DUPL_ID`
|
||||
|
||||
The value of the property can be of type `byte[]` or `SimpleString` if
|
||||
you're using the core API. If you're using JMS it must be a `String`,
|
||||
|
|
|
@ -31,21 +31,21 @@ JMS message, Apache ActiveMQ core filter expressions operate on a core message.
|
|||
The following identifiers can be used in a core filter expressions to
|
||||
refer to attributes of the core message in an expression:
|
||||
|
||||
- `HQPriority`. To refer to the priority of a message. Message
|
||||
- `AMQPriority`. To refer to the priority of a message. Message
|
||||
priorities are integers with valid values from `0 - 9`. `0` is the
|
||||
lowest priority and `9` is the highest. E.g.
|
||||
`HQPriority = 3 AND animal = 'aardvark'`
|
||||
`AMQPriority = 3 AND animal = 'aardvark'`
|
||||
|
||||
- `HQExpiration`. To refer to the expiration time of a message. The
|
||||
- `AMQExpiration`. To refer to the expiration time of a message. The
|
||||
value is a long integer.
|
||||
|
||||
- `HQDurable`. To refer to whether a message is durable or not. The
|
||||
- `AMQDurable`. To refer to whether a message is durable or not. The
|
||||
value is a string with valid values: `DURABLE` or `NON_DURABLE`.
|
||||
|
||||
- `HQTimestamp`. The timestamp of when the message was created. The
|
||||
- `AMQTimestamp`. The timestamp of when the message was created. The
|
||||
value is a long integer.
|
||||
|
||||
- `HQSize`. The size of a message in bytes. The value is an integer.
|
||||
- `AMQSize`. The size of a message in bytes. The value is an integer.
|
||||
|
||||
Any other identifiers used in core filter expressions will be assumed to
|
||||
be properties of the message.
|
||||
|
|
|
@ -156,10 +156,10 @@ unique ID, just set the `stompEnableMessageId` to true. For example:
|
|||
When the server starts with the above setting, each stomp message sent
|
||||
through this acceptor will have an extra property added. The property
|
||||
key is `
|
||||
hq-message-id` and the value is a String representation of a
|
||||
amq-message-id` and the value is a String representation of a
|
||||
long type internal message id prefixed with "`STOMP`", like:
|
||||
|
||||
hq-message-id : STOMP12345
|
||||
amq-message-id : STOMP12345
|
||||
|
||||
If `stomp-enable-message-id` is not specified in the configuration,
|
||||
default is `false`.
|
||||
|
|
|
@ -167,17 +167,17 @@ which are also available through JMS by the use of object properties.
|
|||
<tr>
|
||||
<td>setBodyInputStream(InputStream)</td>
|
||||
<td>Set the InputStream used to read a message body when sending it.</td>
|
||||
<td>JMS_HQ_InputStream</td>
|
||||
<td>JMS_AMQ_InputStream</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>setOutputStream(OutputStream)</td>
|
||||
<td>Set the OutputStream that will receive the body of a message. This method does not block.</td>
|
||||
<td>JMS_HQ_OutputStream</td>
|
||||
<td>JMS_AMQ_OutputStream</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>saveOutputStream(OutputStream)</td>
|
||||
<td>Save the body of the message to the `OutputStream`. It will block until the entire content is transferred to the `OutputStream`.</td>
|
||||
<td>JMS_HQ_SaveStream</td>
|
||||
<td>JMS_AMQ_SaveStream</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -209,7 +209,7 @@ msg.setInputStream(dataInputStream);
|
|||
Notice also that for messages with more than 2GiB the getBodySize() will
|
||||
return invalid values since this is an integer (which is also exposed to
|
||||
the JMS API). On those cases you can use the message property
|
||||
_HQ_LARGE_SIZE.
|
||||
_AMQ_LARGE_SIZE.
|
||||
|
||||
### Streaming over JMS
|
||||
|
||||
|
@ -218,7 +218,7 @@ ClientMessage API table above) by setting object properties . You can use the me
|
|||
`Message.setObjectProperty` to set the input and output streams.
|
||||
|
||||
The `InputStream` can be defined through the JMS Object Property
|
||||
JMS_HQ_InputStream on messages being sent:
|
||||
JMS_AMQ_InputStream on messages being sent:
|
||||
|
||||
``` java
|
||||
BytesMessage message = session.createBytesMessage();
|
||||
|
@ -227,13 +227,13 @@ FileInputStream fileInputStream = new FileInputStream(fileInput);
|
|||
|
||||
BufferedInputStream bufferedInput = new BufferedInputStream(fileInputStream);
|
||||
|
||||
message.setObjectProperty("JMS_HQ_InputStream", bufferedInput);
|
||||
message.setObjectProperty("JMS_AMQ_InputStream", bufferedInput);
|
||||
|
||||
someProducer.send(message);
|
||||
```
|
||||
|
||||
The `OutputStream` can be set through the JMS Object Property
|
||||
JMS_HQ_SaveStream on messages being received in a blocking way.
|
||||
JMS_AMQ_SaveStream on messages being received in a blocking way.
|
||||
|
||||
``` java
|
||||
BytesMessage messageReceived = (BytesMessage)messageConsumer.receive(120000);
|
||||
|
@ -245,15 +245,15 @@ FileOutputStream fileOutputStream = new FileOutputStream(outputFile);
|
|||
BufferedOutputStream bufferedOutput = new BufferedOutputStream(fileOutputStream);
|
||||
|
||||
// This will block until the entire content is saved on disk
|
||||
messageReceived.setObjectProperty("JMS_HQ_SaveStream", bufferedOutput);
|
||||
messageReceived.setObjectProperty("JMS_AMQ_SaveStream", bufferedOutput);
|
||||
```
|
||||
|
||||
Setting the `OutputStream` could also be done in a non blocking way
|
||||
using the property JMS_HQ_OutputStream.
|
||||
using the property JMS_AMQ_OutputStream.
|
||||
|
||||
``` java
|
||||
// This won't wait the stream to finish. You need to keep the consumer active.
|
||||
messageReceived.setObjectProperty("JMS_HQ_OutputStream", bufferedOutput);
|
||||
messageReceived.setObjectProperty("JMS_AMQ_OutputStream", bufferedOutput);
|
||||
```
|
||||
|
||||
> **Note**
|
||||
|
|
|
@ -21,7 +21,7 @@ to configure Last-Value queues for a set of addresses (see [here](wildcard-synta
|
|||
|
||||
## Using Last-Value Property
|
||||
|
||||
The property name used to identify the last value is `"_HQ_LVQ_NAME"`
|
||||
The property name used to identify the last value is `"_AMQ_LVQ_NAME"`
|
||||
(or the constant `Message.HDR_LAST_VALUE_NAME` from the Core API).
|
||||
|
||||
For example, if two messages with the same value for the Last-Value
|
||||
|
@ -31,12 +31,12 @@ kept in the queue:
|
|||
``` java
|
||||
// send 1st message with Last-Value property set to STOCK_NAME
|
||||
TextMessage message = session.createTextMessage("1st message with Last-Value property set");
|
||||
message.setStringProperty("_HQ_LVQ_NAME", "STOCK_NAME");
|
||||
message.setStringProperty("_AMQ_LVQ_NAME", "STOCK_NAME");
|
||||
producer.send(message);
|
||||
|
||||
// send 2nd message with Last-Value property set to STOCK_NAME
|
||||
message = session.createTextMessage("2nd message with Last-Value property set");
|
||||
message.setStringProperty("_HQ_LVQ_NAME", "STOCK_NAME");
|
||||
message.setStringProperty("_AMQ_LVQ_NAME", "STOCK_NAME");
|
||||
producer.send(message);
|
||||
|
||||
...
|
||||
|
|
|
@ -800,40 +800,40 @@ See the [examples](examples.md) chapter for an example which shows how to use a
|
|||
|
||||
Below is a list of all the different kinds of notifications as well as
|
||||
which headers are on the messages. Every notification has a
|
||||
`_HQ_NotifType` (value noted in parentheses) and `_HQ_NotifTimestamp`
|
||||
`_AMQ_NotifType` (value noted in parentheses) and `_AMQ_NotifTimestamp`
|
||||
header. The timestamp is the un-formatted result of a call to
|
||||
`java.lang.System.currentTimeMillis()`.
|
||||
|
||||
- `BINDING_ADDED` (0)
|
||||
|
||||
`_HQ_Binding_Type`, `_HQ_Address`, `_HQ_ClusterName`,
|
||||
`_HQ_RoutingName`, `_HQ_Binding_ID`, `_HQ_Distance`,
|
||||
`_HQ_FilterString`
|
||||
`_AMQ_Binding_Type`, `_AMQ_Address`, `_AMQ_ClusterName`,
|
||||
`_AMQ_RoutingName`, `_AMQ_Binding_ID`, `_AMQ_Distance`,
|
||||
`_AMQ_FilterString`
|
||||
|
||||
- `BINDING_REMOVED` (1)
|
||||
|
||||
`_HQ_Address`, `_HQ_ClusterName`, `_HQ_RoutingName`,
|
||||
`_HQ_Binding_ID`, `_HQ_Distance`, `_HQ_FilterString`
|
||||
`_AMQ_Address`, `_AMQ_ClusterName`, `_AMQ_RoutingName`,
|
||||
`_AMQ_Binding_ID`, `_AMQ_Distance`, `_AMQ_FilterString`
|
||||
|
||||
- `CONSUMER_CREATED` (2)
|
||||
|
||||
`_HQ_Address`, `_HQ_ClusterName`, `_HQ_RoutingName`, `_HQ_Distance`,
|
||||
`_HQ_ConsumerCount`, `_HQ_User`, `_HQ_RemoteAddress`,
|
||||
`_HQ_SessionName`, `_HQ_FilterString`
|
||||
`_AMQ_Address`, `_AMQ_ClusterName`, `_AMQ_RoutingName`, `_AMQ_Distance`,
|
||||
`_AMQ_ConsumerCount`, `_AMQ_User`, `_AMQ_RemoteAddress`,
|
||||
`_AMQ_SessionName`, `_AMQ_FilterString`
|
||||
|
||||
- `CONSUMER_CLOSED` (3)
|
||||
|
||||
`_HQ_Address`, `_HQ_ClusterName`, `_HQ_RoutingName`, `_HQ_Distance`,
|
||||
`_HQ_ConsumerCount`, `_HQ_User`, `_HQ_RemoteAddress`,
|
||||
`_HQ_SessionName`, `_HQ_FilterString`
|
||||
`_AMQ_Address`, `_AMQ_ClusterName`, `_AMQ_RoutingName`, `_AMQ_Distance`,
|
||||
`_AMQ_ConsumerCount`, `_AMQ_User`, `_AMQ_RemoteAddress`,
|
||||
`_AMQ_SessionName`, `_AMQ_FilterString`
|
||||
|
||||
- `SECURITY_AUTHENTICATION_VIOLATION` (6)
|
||||
|
||||
`_HQ_User`
|
||||
`_AMQ_User`
|
||||
|
||||
- `SECURITY_PERMISSION_VIOLATION` (7)
|
||||
|
||||
`_HQ_Address`, `_HQ_CheckType`, `_HQ_User`
|
||||
`_AMQ_Address`, `_AMQ_CheckType`, `_AMQ_User`
|
||||
|
||||
- `DISCOVERY_GROUP_STARTED` (8)
|
||||
|
||||
|
@ -877,19 +877,19 @@ header. The timestamp is the un-formatted result of a call to
|
|||
|
||||
- `PROPOSAL` (18)
|
||||
|
||||
`_JBM_ProposalGroupId`, `_JBM_ProposalValue`, `_HQ_Binding_Type`,
|
||||
`_HQ_Address`, `_HQ_Distance`
|
||||
`_JBM_ProposalGroupId`, `_JBM_ProposalValue`, `_AMQ_Binding_Type`,
|
||||
`_AMQ_Address`, `_AMQ_Distance`
|
||||
|
||||
- `PROPOSAL_RESPONSE` (19)
|
||||
|
||||
`_JBM_ProposalGroupId`, `_JBM_ProposalValue`,
|
||||
`_JBM_ProposalAltValue`, `_HQ_Binding_Type`, `_HQ_Address`,
|
||||
`_HQ_Distance`
|
||||
`_JBM_ProposalAltValue`, `_AMQ_Binding_Type`, `_AMQ_Address`,
|
||||
`_AMQ_Distance`
|
||||
|
||||
- `CONSUMER_SLOW` (21)
|
||||
|
||||
`_HQ_Address`, `_HQ_ConsumerCount`, `_HQ_RemoteAddress`,
|
||||
`_HQ_ConnectionName`, `_HQ_ConsumerName`, `_HQ_SessionName`
|
||||
`_AMQ_Address`, `_AMQ_ConsumerCount`, `_AMQ_RemoteAddress`,
|
||||
`_AMQ_ConnectionName`, `_AMQ_ConsumerName`, `_AMQ_SessionName`
|
||||
|
||||
## Message Counters
|
||||
|
||||
|
|
|
@ -27,17 +27,17 @@ JMS MessageProducer allows to set a TimeToLive for the messages it sent:
|
|||
Expired messages which are consumed from an expiry address have the
|
||||
following properties:
|
||||
|
||||
- `_HQ_ORIG_ADDRESS`
|
||||
- `_AMQ_ORIG_ADDRESS`
|
||||
|
||||
a String property containing the *original address* of the expired
|
||||
message
|
||||
|
||||
- `_HQ_ORIG_QUEUE`
|
||||
- `_AMQ_ORIG_QUEUE`
|
||||
|
||||
a String property containing the *original queue* of the expired
|
||||
message
|
||||
|
||||
- `_HQ_ACTUAL_EXPIRY`
|
||||
- `_AMQ_ACTUAL_EXPIRY`
|
||||
|
||||
a Long property containing the *actual expiration time* of the
|
||||
expired message
|
||||
|
|
|
@ -5,7 +5,7 @@ characteristics:
|
|||
|
||||
- Messages in a message group share the same group id, i.e. they have
|
||||
same group identifier property (`JMSXGroupID` for JMS,
|
||||
`_HQ_GROUP_ID` for Apache ActiveMQ Core API).
|
||||
`_AMQ_GROUP_ID` for Apache ActiveMQ Core API).
|
||||
|
||||
- Messages in a message group are always consumed by the same
|
||||
consumer, even if there are many consumers on a queue. They pin all
|
||||
|
@ -20,7 +20,7 @@ An example might be orders for a certain stock. You may want orders for
|
|||
any particular stock to be processed serially by the same consumer. To
|
||||
do this you can create a pool of consumers (perhaps one for each stock,
|
||||
but less will work too), then set the stock name as the value of the
|
||||
_HQ_GROUP_ID property.
|
||||
_AMQ_GROUP_ID property.
|
||||
|
||||
This will ensure that all messages for a particular stock will always be
|
||||
processed by the same consumer.
|
||||
|
@ -42,7 +42,7 @@ processed by the same consumer.
|
|||
|
||||
## Using Core API
|
||||
|
||||
The property name used to identify the message group is `"_HQ_GROUP_ID"`
|
||||
The property name used to identify the message group is `"_AMQ_GROUP_ID"`
|
||||
(or the constant `MessageImpl.HDR_GROUP_ID`). Alternatively, you can set
|
||||
`autogroup` to true on the `SessionFactory` which will pick a random
|
||||
unique id.
|
||||
|
|
|
@ -113,7 +113,7 @@ The standard Apache ActiveMQ core server uses two instances of the journal:
|
|||
fall back to using Java NIO which is available on any Java platform.
|
||||
|
||||
The files on this journal are prefixed as `activemq-data`. Each file
|
||||
has a `hq` extension. File size is by the default `10485760`
|
||||
has a `amq` extension. File size is by the default `10485760`
|
||||
(configurable), and it is located at the journal folder.
|
||||
|
||||
For large messages, Apache ActiveMQ persists them outside the message journal.
|
||||
|
|
|
@ -541,8 +541,8 @@ posted to the system.
|
|||
If you happen to use the same ID more than once you'll see a message
|
||||
like this on the server:
|
||||
|
||||
WARN [org.apache.activemq.core.server] (Thread-3 (Apache ActiveMQ-remoting-threads-ActiveMQServerImpl::serverUUID=8d6be6f8-5e8b-11e2-80db-51bbde66f473-26319292-267207)) HQ112098: Duplicate message detected - message will not be routed. Message information:
|
||||
ServerMessage[messageID=20,priority=4, bodySize=1500,expiration=0, durable=true, address=jms.queue.bar,properties=TypedProperties[{http_content$type=application/x-www-form-urlencoded, http_content$length=3, postedAsHttpMessage=true, _HQ_DUPL_ID=42}]]@12835058
|
||||
WARN [org.apache.activemq.core.server] (Thread-3 (Apache ActiveMQ-remoting-threads-ActiveMQServerImpl::serverUUID=8d6be6f8-5e8b-11e2-80db-51bbde66f473-26319292-267207)) AMQ112098: Duplicate message detected - message will not be routed. Message information:
|
||||
ServerMessage[messageID=20,priority=4, bodySize=1500,expiration=0, durable=true, address=jms.queue.bar,properties=TypedProperties[{http_content$type=application/x-www-form-urlencoded, http_content$length=3, postedAsHttpMessage=true, _AMQ_DUPL_ID=42}]]@12835058
|
||||
|
||||
An alternative to this approach is to use the `msg-create-with-id`
|
||||
header. This is not an invokable URL, but a URL template. The idea is
|
||||
|
|
|
@ -8,7 +8,7 @@ To do this, a special property is set on the message before sending it.
|
|||
## Scheduled Delivery Property
|
||||
|
||||
The property name used to identify a scheduled message is
|
||||
`"_HQ_SCHED_DELIVERY"` (or the constant
|
||||
`"_AMQ_SCHED_DELIVERY"` (or the constant
|
||||
`Message.HDR_SCHEDULED_DELIVERY_TIME`).
|
||||
|
||||
The specified value must be a positive `long` corresponding to the time
|
||||
|
@ -17,7 +17,7 @@ scheduled message using the JMS API is as follows.
|
|||
|
||||
``` java
|
||||
TextMessage message = session.createTextMessage("This is a scheduled message message which will be delivered in 5 sec.");
|
||||
message.setLongProperty("_HQ_SCHED_DELIVERY", System.currentTimeMillis() + 5000);
|
||||
message.setLongProperty("_AMQ_SCHED_DELIVERY", System.currentTimeMillis() + 5000);
|
||||
producer.send(message);
|
||||
|
||||
...
|
||||
|
|
|
@ -127,12 +127,12 @@ set of addresses (see [Understanding the Wildcard Syntax](wildcard-syntax.md)).
|
|||
Dead letter messages which are consumed from a dead letter address have
|
||||
the following properties:
|
||||
|
||||
- `_HQ_ORIG_ADDRESS`
|
||||
- `_AMQ_ORIG_ADDRESS`
|
||||
|
||||
a String property containing the *original address* of the dead
|
||||
letter message
|
||||
|
||||
- `_HQ_ORIG_QUEUE`
|
||||
- `_AMQ_ORIG_QUEUE`
|
||||
|
||||
a String property containing the *original queue* of the dead letter
|
||||
message
|
||||
|
|
|
@ -189,9 +189,9 @@ under the License.
|
|||
<code>System.out.println("Destination of the message: " + ((Queue)messageReceived.getJMSDestination()).getQueueName());</code>
|
||||
</pre>
|
||||
|
||||
<li>The <strong>origin destination</strong> is stored in the <code>_HQ_ORIG_ADDRESS</code> property
|
||||
<li>The <strong>origin destination</strong> is stored in the <code>_AMQ_ORIG_ADDRESS</code> property
|
||||
<pre class="prettyprint">
|
||||
<code>System.out.println("*Origin destination* of the message: " + messageReceived.getStringProperty("_HQ_ORIG_ADDRESS"));</code>
|
||||
<code>System.out.println("*Origin destination* of the message: " + messageReceived.getStringProperty("_AMQ_ORIG_ADDRESS"));</code>
|
||||
</pre>
|
||||
|
||||
<li>We do not forget to commit the session to acknowledge that we have received the message from the dead letter queue</li>
|
||||
|
|
|
@ -127,8 +127,8 @@ public class DeadLetterExample extends ActiveMQExample
|
|||
// Step 21. the messageReceived's destination is now the dead letter queue.
|
||||
System.out.println("Destination of the message: " + ((Queue)messageReceived.getJMSDestination()).getQueueName());
|
||||
|
||||
// Step 22. the *origin* destination is stored in the _HQ_ORIG_ADDRESS property
|
||||
System.out.println("*Origin destination* of the message: " + messageReceived.getStringProperty("_HQ_ORIG_ADDRESS"));
|
||||
// Step 22. the *origin* destination is stored in the _AMQ_ORIG_ADDRESS property
|
||||
System.out.println("*Origin destination* of the message: " + messageReceived.getStringProperty("_AMQ_ORIG_ADDRESS"));
|
||||
|
||||
// Step 23. This time, we commit the session, the delivery from the dead letter queue is successful!
|
||||
session.commit();
|
||||
|
|
|
@ -112,10 +112,10 @@ public class ExpiryExample extends ActiveMQExample
|
|||
System.out.println("Expiration time of the expired message (relative to the expiry queue): " + messageReceived.getJMSExpiration());
|
||||
|
||||
System.out.println();
|
||||
// Step 20. the *origin* destination is stored in the _HQ_ORIG_ADDRESS property
|
||||
System.out.println("*Origin destination* of the expired message: " + messageReceived.getStringProperty("_HQ_ORIG_ADDRESS"));
|
||||
// Step 21. the actual expiration time is stored in the _HQ_ACTUAL_EXPIRY property
|
||||
System.out.println("*Actual expiration time* of the expired message: " + messageReceived.getLongProperty("_HQ_ACTUAL_EXPIRY"));
|
||||
// Step 20. the *origin* destination is stored in the _AMQ_ORIG_ADDRESS property
|
||||
System.out.println("*Origin destination* of the expired message: " + messageReceived.getStringProperty("_AMQ_ORIG_ADDRESS"));
|
||||
// Step 21. the actual expiration time is stored in the _AMQ_ACTUAL_EXPIRY property
|
||||
System.out.println("*Actual expiration time* of the expired message: " + messageReceived.getLongProperty("_AMQ_ACTUAL_EXPIRY"));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ under the License.
|
|||
<li>We display the message ID and its "bridged" message ID</li>
|
||||
<pre class="prettyprint">
|
||||
System.out.format("Message ID : %s\n", messageReceived.getJMSMessageID());
|
||||
System.out.format("Bridged Message ID : %s\n", messageReceived.getStringProperty("HQ_BRIDGE_MSG_ID_LIST"));
|
||||
System.out.format("Bridged Message ID : %s\n", messageReceived.getStringProperty("AMQ_BRIDGE_MSG_ID_LIST"));
|
||||
</pre>
|
||||
|
||||
<p>Note that the message received from the target queue is <em>not the same message</em> sent to the source topic
|
||||
|
|
|
@ -126,7 +126,7 @@ public class JMSBridgeExample
|
|||
|
||||
// Step 11. Display the received message's ID and this "bridged" message ID
|
||||
System.out.format("Message ID : %s%n", messageReceived.getJMSMessageID());
|
||||
System.out.format("Bridged Message ID : %s%n", messageReceived.getStringProperty("HQ_BRIDGE_MSG_ID_LIST"));
|
||||
System.out.format("Bridged Message ID : %s%n", messageReceived.getStringProperty("AMQ_BRIDGE_MSG_ID_LIST"));
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
@ -98,7 +98,7 @@ under the License.
|
|||
|
||||
BufferedInputStream bufferedInput = new BufferedInputStream(fileInputStream);
|
||||
|
||||
message.setObjectProperty("JMS_HQ_InputStream", bufferedInput);
|
||||
message.setObjectProperty("JMS_AMQ_InputStream", bufferedInput);
|
||||
</code></pre>
|
||||
|
||||
<li>Send the Message.</li>
|
||||
|
@ -174,7 +174,7 @@ under the License.
|
|||
|
||||
<li>This will save the stream and wait until the entire message is written before continuing.</li>
|
||||
<pre class="prettyprint"><code>
|
||||
messageReceived.setObjectProperty("JMS_HQ_SaveStream", bufferedOutput);
|
||||
messageReceived.setObjectProperty("JMS_AMQ_SaveStream", bufferedOutput);
|
||||
</code></pre>
|
||||
|
||||
<li>Be sure to close our resources!</li>
|
||||
|
|
|
@ -102,7 +102,7 @@ public class LargeMessageExample extends ActiveMQExample
|
|||
FileInputStream fileInputStream = new FileInputStream(fileInput);
|
||||
BufferedInputStream bufferedInput = new BufferedInputStream(fileInputStream);
|
||||
|
||||
message.setObjectProperty("JMS_HQ_InputStream", bufferedInput);
|
||||
message.setObjectProperty("JMS_AMQ_InputStream", bufferedInput);
|
||||
|
||||
System.out.println("Sending the huge message.");
|
||||
|
||||
|
@ -154,7 +154,7 @@ public class LargeMessageExample extends ActiveMQExample
|
|||
// an empty body.
|
||||
BytesMessage messageReceived = (BytesMessage)messageConsumer.receive(120000);
|
||||
|
||||
System.out.println("Received message with: " + messageReceived.getLongProperty("_HQ_LARGE_SIZE") +
|
||||
System.out.println("Received message with: " + messageReceived.getLongProperty("_AMQ_LARGE_SIZE") +
|
||||
" bytes. Now streaming to file on disk.");
|
||||
|
||||
// Step 13. We set an OutputStream on the message. This causes the message body to be written to the
|
||||
|
@ -170,7 +170,7 @@ public class LargeMessageExample extends ActiveMQExample
|
|||
BufferedOutputStream bufferedOutput = new BufferedOutputStream(fileOutputStream);
|
||||
|
||||
// Step 14. This will save the stream and wait until the entire message is written before continuing.
|
||||
messageReceived.setObjectProperty("JMS_HQ_SaveStream", bufferedOutput);
|
||||
messageReceived.setObjectProperty("JMS_AMQ_SaveStream", bufferedOutput);
|
||||
|
||||
fileOutputStream.close();
|
||||
|
||||
|
|
|
@ -72,17 +72,17 @@ under the License.
|
|||
<li>We will create and send a text message with the Last-Value property set to <code>STOCK_NAME</code></li>
|
||||
<pre class="prettyprint">
|
||||
<code>TextMessage message = session.createTextMessage("1st message with Last-Value property set");
|
||||
message.setStringProperty("_HQ_LVQ_NAME", "STOCK_NAME");
|
||||
message.setStringProperty("_AMQ_LVQ_NAME", "STOCK_NAME");
|
||||
producer.send(message);
|
||||
System.out.format("Sent message: %s\n", message.getText());</code>
|
||||
</pre>
|
||||
|
||||
<p><em>The <em>Last-Value</em> key is defined in ActiveMQ's MessageImpl class. Its value is <code>"_HQ_LVQ_NAME"</code></em></p>
|
||||
<p><em>The <em>Last-Value</em> key is defined in ActiveMQ's MessageImpl class. Its value is <code>"_AMQ_LVQ_NAME"</code></em></p>
|
||||
|
||||
<li>We will create and send a <em>second</em> text message with the Last-Value property set to <code>STOCK_NAME</code></li>
|
||||
<pre class="prettyprint">
|
||||
<code>message = session.createTextMessage("2nd message with Last-Value property set");
|
||||
message.setStringProperty("_HQ_LVQ_NAME", "STOCK_NAME");
|
||||
message.setStringProperty("_AMQ_LVQ_NAME", "STOCK_NAME");
|
||||
producer.send(message);
|
||||
System.out.format("Sent message: %s\n", message.getText());</code>
|
||||
</pre>
|
||||
|
@ -90,7 +90,7 @@ under the License.
|
|||
<li>We will create and send a <em>third</em> text message with the Last-Value property set to <code>STOCK_NAME</code></li>
|
||||
<pre class="prettyprint">
|
||||
<code>message = session.createTextMessage("3rd message with Last-Value property set");
|
||||
message.setStringProperty("_HQ_LVQ_NAME", "STOCK_NAME");
|
||||
message.setStringProperty("_AMQ_LVQ_NAME", "STOCK_NAME");
|
||||
producer.send(message);
|
||||
System.out.format("Sent message: %s\n", message.getText());</code>
|
||||
</pre>
|
||||
|
|
|
@ -64,19 +64,19 @@ public class LastValueQueueExample extends ActiveMQExample
|
|||
|
||||
// Step 5. Create and send a text message with the Last-Value header set
|
||||
TextMessage message = session.createTextMessage("1st message with Last-Value property set");
|
||||
message.setStringProperty("_HQ_LVQ_NAME", "STOCK_NAME");
|
||||
message.setStringProperty("_AMQ_LVQ_NAME", "STOCK_NAME");
|
||||
producer.send(message);
|
||||
System.out.format("Sent message: %s%n", message.getText());
|
||||
|
||||
// Step 6. Create and send a second text message with the Last-Value header set
|
||||
message = session.createTextMessage("2nd message with Last-Value property set");
|
||||
message.setStringProperty("_HQ_LVQ_NAME", "STOCK_NAME");
|
||||
message.setStringProperty("_AMQ_LVQ_NAME", "STOCK_NAME");
|
||||
producer.send(message);
|
||||
System.out.format("Sent message: %s%n", message.getText());
|
||||
|
||||
// Step 7. Create and send a third text message with the Last-Value header set
|
||||
message = session.createTextMessage("3rd message with Last-Value property set");
|
||||
message.setStringProperty("_HQ_LVQ_NAME", "STOCK_NAME");
|
||||
message.setStringProperty("_AMQ_LVQ_NAME", "STOCK_NAME");
|
||||
producer.send(message);
|
||||
System.out.format("Sent message: %s%n", message.getText());
|
||||
|
||||
|
|
|
@ -133,12 +133,12 @@ under the License.
|
|||
<pre class="prettyprint">
|
||||
<code>------------------------
|
||||
Received notification:
|
||||
_HQ_RoutingName: jms.queue.exampleQueue
|
||||
_HQ_Address: jms.queue.exampleQueue
|
||||
_AMQ_RoutingName: jms.queue.exampleQueue
|
||||
_AMQ_Address: jms.queue.exampleQueue
|
||||
...
|
||||
_HQ_ConsumerCount: 1
|
||||
_AMQ_ConsumerCount: 1
|
||||
...
|
||||
_HQ_NotifType: CONSUMER_CREATED
|
||||
_AMQ_NotifType: CONSUMER_CREATED
|
||||
------------------------</code>
|
||||
</pre>
|
||||
<p>The notification tells us that a consumer was created for the JMS queue <code>exampleQueue</code>. When the notification
|
||||
|
@ -153,12 +153,12 @@ under the License.
|
|||
<pre class="prettyprint">
|
||||
<code>------------------------
|
||||
Received notification:
|
||||
_HQ_RoutingName: jms.queue.exampleQueue
|
||||
_HQ_Address: jms.queue.exampleQueue
|
||||
_AMQ_RoutingName: jms.queue.exampleQueue
|
||||
_AMQ_Address: jms.queue.exampleQueue
|
||||
...
|
||||
_HQ_ConsumerCount: 0
|
||||
_AMQ_ConsumerCount: 0
|
||||
...
|
||||
_HQ_NotifType: CONSUMER_CLOSED
|
||||
_AMQ_NotifType: CONSUMER_CLOSED
|
||||
------------------------</code>
|
||||
</pre>
|
||||
<p>The notification tells us that a consumer was closed for the JMS queue <code>exampleQueue</code>. When the notification
|
||||
|
@ -178,9 +178,9 @@ under the License.
|
|||
<pre class="prettyprint">
|
||||
<code>------------------------
|
||||
Received notification:
|
||||
_HQ_User: not.a.valid.user
|
||||
_AMQ_User: not.a.valid.user
|
||||
...
|
||||
_HQ_NotifType: SECURITY_AUTHENTICATION_VIOLATION
|
||||
_AMQ_NotifType: SECURITY_AUTHENTICATION_VIOLATION
|
||||
------------------------
|
||||
</code>
|
||||
</pre>
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.jboss.logging.BasicLogger;
|
|||
import org.jboss.logging.Logger;
|
||||
import org.jboss.logging.annotations.MessageLogger;
|
||||
|
||||
@MessageLogger(projectCode = "HQTEST")
|
||||
@MessageLogger(projectCode = "AMQTEST")
|
||||
public interface ExtrasTestLogger extends BasicLogger
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -125,7 +125,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase
|
|||
if (packet.getType() == PacketImpl.SESS_SEND)
|
||||
{
|
||||
SessionSendMessage sendMessage = (SessionSendMessage) packet;
|
||||
if (sendMessage.getMessage().containsProperty("__HQ_CID") && count < 0 && !stopped)
|
||||
if (sendMessage.getMessage().containsProperty("__AMQ_CID") && count < 0 && !stopped)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -155,7 +155,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase
|
|||
static CountDownLatch stopLatch = new CountDownLatch(1);
|
||||
public static void pause2(MessageInternal msgI, boolean sendBlocking, final ClientProducerCredits theCredits)
|
||||
{
|
||||
if (msgI.containsProperty("__HQ_CID"))
|
||||
if (msgI.containsProperty("__AMQ_CID"))
|
||||
{
|
||||
count--;
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ public class DuplicateDetectionTest extends ServiceTestBase
|
|||
producer.close();
|
||||
consumer.close();
|
||||
|
||||
// there will be 2 ID caches, one for messages using "_HQ_DUPL_ID" and one for "_HQ_BRIDGE_DUP"
|
||||
// there will be 2 ID caches, one for messages using "_AMQ_DUPL_ID" and one for "_AMQ_BRIDGE_DUP"
|
||||
Assert.assertEquals(2, ((PostOfficeImpl)messagingService.getPostOffice()).getDuplicateIDCaches().size());
|
||||
session.deleteQueue(queueName);
|
||||
Assert.assertEquals(0, ((PostOfficeImpl)messagingService.getPostOffice()).getDuplicateIDCaches().size());
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.jboss.logging.BasicLogger;
|
|||
import org.jboss.logging.Logger;
|
||||
import org.jboss.logging.annotations.MessageLogger;
|
||||
|
||||
@MessageLogger(projectCode = "HQTEST")
|
||||
@MessageLogger(projectCode = "AMQTEST")
|
||||
public interface IntegrationTestLogger extends BasicLogger
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -131,7 +131,7 @@ public class MessageGroupingTest extends UnitTestCase
|
|||
for (int messageId = 0; messageId < 3; messageId++)
|
||||
{
|
||||
ClientMessage message = clientSession.createMessage(false);
|
||||
message.putStringProperty("_HQ_GROUP_ID", "" + group);
|
||||
message.putStringProperty("_AMQ_GROUP_ID", "" + group);
|
||||
clientProducer.send(message);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ public class GroupingTest extends JMSTestBase
|
|||
|
||||
message.setText("Message" + j);
|
||||
|
||||
message.setStringProperty("_HQ_GROUP_ID", "" + (j % 10));
|
||||
message.setStringProperty("_AMQ_GROUP_ID", "" + (j % 10));
|
||||
|
||||
producer.send(message);
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ public class JMSLargeMessageTest extends JMSTestBase
|
|||
|
||||
BytesMessage m = session.createBytesMessage();
|
||||
|
||||
m.setObjectProperty("JMS_HQ_InputStream", UnitTestCase.createFakeLargeStream(1024 * 1024));
|
||||
m.setObjectProperty("JMS_AMQ_InputStream", UnitTestCase.createFakeLargeStream(1024 * 1024));
|
||||
|
||||
prod.send(m);
|
||||
|
||||
|
@ -130,7 +130,7 @@ public class JMSLargeMessageTest extends JMSTestBase
|
|||
|
||||
BytesMessage m = session.createBytesMessage();
|
||||
|
||||
m.setObjectProperty("JMS_HQ_InputStream", UnitTestCase.createFakeLargeStream(10));
|
||||
m.setObjectProperty("JMS_AMQ_InputStream", UnitTestCase.createFakeLargeStream(10));
|
||||
|
||||
prod.send(m);
|
||||
|
||||
|
@ -171,7 +171,7 @@ public class JMSLargeMessageTest extends JMSTestBase
|
|||
|
||||
try
|
||||
{
|
||||
msg.setObjectProperty("JMS_HQ_InputStream", UnitTestCase.createFakeLargeStream(10));
|
||||
msg.setObjectProperty("JMS_AMQ_InputStream", UnitTestCase.createFakeLargeStream(10));
|
||||
Assert.fail("Exception was expected");
|
||||
}
|
||||
catch (JMSException e)
|
||||
|
@ -198,7 +198,7 @@ public class JMSLargeMessageTest extends JMSTestBase
|
|||
|
||||
try
|
||||
{
|
||||
rm.setObjectProperty("JMS_HQ_OutputStream", new OutputStream()
|
||||
rm.setObjectProperty("JMS_AMQ_OutputStream", new OutputStream()
|
||||
{
|
||||
@Override
|
||||
public void write(final int b) throws IOException
|
||||
|
@ -232,7 +232,7 @@ public class JMSLargeMessageTest extends JMSTestBase
|
|||
|
||||
BytesMessage m = session.createBytesMessage();
|
||||
|
||||
m.setObjectProperty("JMS_HQ_InputStream", UnitTestCase.createFakeLargeStream(msgSize));
|
||||
m.setObjectProperty("JMS_AMQ_InputStream", UnitTestCase.createFakeLargeStream(msgSize));
|
||||
|
||||
prod.send(m);
|
||||
|
||||
|
@ -273,14 +273,14 @@ public class JMSLargeMessageTest extends JMSTestBase
|
|||
|
||||
try
|
||||
{
|
||||
rm.setObjectProperty("JMS_HQ_InputStream", UnitTestCase.createFakeLargeStream(100));
|
||||
rm.setObjectProperty("JMS_AMQ_InputStream", UnitTestCase.createFakeLargeStream(100));
|
||||
Assert.fail("Exception expected!");
|
||||
}
|
||||
catch (MessageNotWriteableException expected)
|
||||
{
|
||||
}
|
||||
|
||||
rm.setObjectProperty("JMS_HQ_SaveStream", out);
|
||||
rm.setObjectProperty("JMS_AMQ_SaveStream", out);
|
||||
|
||||
Assert.assertEquals(msgSize, numberOfBytes.get());
|
||||
|
||||
|
|
|
@ -90,14 +90,14 @@ public class ManagementWithStompTest extends ManagementTestBase
|
|||
// retrieve the address of the queue
|
||||
frame = "\nSEND\n" + "destination:" + ActiveMQDefaultConfiguration.getDefaultManagementAddress() + "\n" +
|
||||
"reply-to:" + address + "\n" +
|
||||
"_HQ_ResourceName:" + ResourceNames.CORE_QUEUE + queue + "\n" +
|
||||
"_HQ_Attribute: Address\n\n" +
|
||||
"_AMQ_ResourceName:" + ResourceNames.CORE_QUEUE + queue + "\n" +
|
||||
"_AMQ_Attribute: Address\n\n" +
|
||||
Stomp.NULL;
|
||||
sendFrame(frame);
|
||||
|
||||
frame = receiveFrame(10000);
|
||||
System.out.println(frame);
|
||||
assertTrue(frame.contains("_HQ_OperationSucceeded:true"));
|
||||
assertTrue(frame.contains("_AMQ_OperationSucceeded:true"));
|
||||
// the address will be returned in the message body in a JSON array
|
||||
Assert.assertTrue(frame.contains("[\"" + address + "\"]"));
|
||||
|
||||
|
@ -133,15 +133,15 @@ public class ManagementWithStompTest extends ManagementTestBase
|
|||
// count number of message with filter "color = 'blue'"
|
||||
frame = "\nSEND\n" + "destination:" + ActiveMQDefaultConfiguration.getDefaultManagementAddress() + "\n" +
|
||||
"reply-to:" + address + "\n" +
|
||||
"_HQ_ResourceName:" + ResourceNames.CORE_QUEUE + queue + "\n" +
|
||||
"_HQ_OperationName: countMessages\n\n" +
|
||||
"_AMQ_ResourceName:" + ResourceNames.CORE_QUEUE + queue + "\n" +
|
||||
"_AMQ_OperationName: countMessages\n\n" +
|
||||
"[\"color = 'blue'\"]" +
|
||||
Stomp.NULL;
|
||||
sendFrame(frame);
|
||||
|
||||
frame = receiveFrame(10000);
|
||||
System.out.println(frame);
|
||||
assertTrue(frame.contains("_HQ_OperationSucceeded:true"));
|
||||
assertTrue(frame.contains("_AMQ_OperationSucceeded:true"));
|
||||
// there is no such messages => 0 returned in a JSON array
|
||||
assertTrue(frame.contains("[0]"));
|
||||
|
||||
|
|
|
@ -748,7 +748,7 @@ public class ExtraStompTest extends StompTestBase
|
|||
while (enu.hasMoreElements())
|
||||
{
|
||||
Message msg = (Message) enu.nextElement();
|
||||
String msgId = msg.getStringProperty("hqMessageId");
|
||||
String msgId = msg.getStringProperty("amqMessageId");
|
||||
if (enable != null && enable.booleanValue())
|
||||
{
|
||||
assertNotNull(msgId);
|
||||
|
|
|
@ -335,7 +335,7 @@ public class TransferMessageTest extends ClusterTestBase
|
|||
"127.0.0.1", "" + TransportConstants.DEFAULT_PORT, "guest", "guest",
|
||||
"output-result",
|
||||
"500", "100",
|
||||
"_HQ_TOOL_original_address='queues.testaddress'");
|
||||
"_AMQ_TOOL_original_address='queues.testaddress'");
|
||||
|
||||
|
||||
ClientSession session = sfs[0].createSession(false, false);
|
||||
|
@ -371,7 +371,7 @@ public class TransferMessageTest extends ClusterTestBase
|
|||
"127.0.0.1", "" + TransportConstants.DEFAULT_PORT, "guest", "guest",
|
||||
"output-result",
|
||||
"500", "100",
|
||||
"_HQ_TOOL_original_address='queues2.testaddress'");
|
||||
"_AMQ_TOOL_original_address='queues2.testaddress'");
|
||||
|
||||
session.start();
|
||||
|
||||
|
|
|
@ -52,20 +52,20 @@ public class SelectorTranslatorTest extends UnitTestCase
|
|||
{
|
||||
String selector = "JMSDeliveryMode='NON_PERSISTENT'";
|
||||
|
||||
Assert.assertEquals("HQDurable='NON_DURABLE'", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals("AMQDurable='NON_DURABLE'", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = "JMSDeliveryMode='PERSISTENT'";
|
||||
|
||||
Assert.assertEquals("HQDurable='DURABLE'", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals("AMQDurable='DURABLE'", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = "color = 'red' AND 'NON_PERSISTENT' = JMSDeliveryMode";
|
||||
|
||||
Assert.assertEquals("color = 'red' AND 'NON_DURABLE' = HQDurable",
|
||||
Assert.assertEquals("color = 'red' AND 'NON_DURABLE' = AMQDurable",
|
||||
SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = "color = 'red' AND 'PERSISTENT' = JMSDeliveryMode";
|
||||
|
||||
Assert.assertEquals("color = 'red' AND 'DURABLE' = HQDurable",
|
||||
Assert.assertEquals("color = 'red' AND 'DURABLE' = AMQDurable",
|
||||
SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
checkNoSubstitute("JMSDeliveryMode");
|
||||
|
@ -76,22 +76,22 @@ public class SelectorTranslatorTest extends UnitTestCase
|
|||
{
|
||||
String selector = "JMSPriority=5";
|
||||
|
||||
Assert.assertEquals("HQPriority=5", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals("AMQPriority=5", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " JMSPriority = 7";
|
||||
|
||||
Assert.assertEquals(" HQPriority = 7", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals(" AMQPriority = 7", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " JMSPriority = 7 OR 1 = JMSPriority AND (JMSPriority= 1 + 4)";
|
||||
|
||||
Assert.assertEquals(" HQPriority = 7 OR 1 = HQPriority AND (HQPriority= 1 + 4)",
|
||||
Assert.assertEquals(" AMQPriority = 7 OR 1 = AMQPriority AND (AMQPriority= 1 + 4)",
|
||||
SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
checkNoSubstitute("JMSPriority");
|
||||
|
||||
selector = "animal = 'lion' JMSPriority = 321 OR animal_name = 'xyzJMSPriorityxyz'";
|
||||
|
||||
Assert.assertEquals("animal = 'lion' HQPriority = 321 OR animal_name = 'xyzJMSPriorityxyz'",
|
||||
Assert.assertEquals("animal = 'lion' AMQPriority = 321 OR animal_name = 'xyzJMSPriorityxyz'",
|
||||
SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
}
|
||||
|
@ -99,25 +99,25 @@ public class SelectorTranslatorTest extends UnitTestCase
|
|||
@Test
|
||||
public void testParseJMSMessageID()
|
||||
{
|
||||
String selector = "JMSMessageID='ID:HQ-12435678";
|
||||
String selector = "JMSMessageID='ID:AMQ-12435678";
|
||||
|
||||
Assert.assertEquals("HQUserID='ID:HQ-12435678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals("AMQUserID='ID:AMQ-12435678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " JMSMessageID='ID:HQ-12435678";
|
||||
selector = " JMSMessageID='ID:AMQ-12435678";
|
||||
|
||||
Assert.assertEquals(" HQUserID='ID:HQ-12435678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals(" AMQUserID='ID:AMQ-12435678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " JMSMessageID = 'ID:HQ-12435678";
|
||||
selector = " JMSMessageID = 'ID:AMQ-12435678";
|
||||
|
||||
Assert.assertEquals(" HQUserID = 'ID:HQ-12435678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals(" AMQUserID = 'ID:AMQ-12435678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " myHeader = JMSMessageID";
|
||||
|
||||
Assert.assertEquals(" myHeader = HQUserID", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals(" myHeader = AMQUserID", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " myHeader = JMSMessageID OR (JMSMessageID = 'ID-HQ' + '12345')";
|
||||
selector = " myHeader = JMSMessageID OR (JMSMessageID = 'ID-AMQ' + '12345')";
|
||||
|
||||
Assert.assertEquals(" myHeader = HQUserID OR (HQUserID = 'ID-HQ' + '12345')", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals(" myHeader = AMQUserID OR (AMQUserID = 'ID-AMQ' + '12345')", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
checkNoSubstitute("JMSMessageID");
|
||||
}
|
||||
|
@ -127,22 +127,22 @@ public class SelectorTranslatorTest extends UnitTestCase
|
|||
{
|
||||
String selector = "JMSTimestamp=12345678";
|
||||
|
||||
Assert.assertEquals("HQTimestamp=12345678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals("AMQTimestamp=12345678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " JMSTimestamp=12345678";
|
||||
|
||||
Assert.assertEquals(" HQTimestamp=12345678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals(" AMQTimestamp=12345678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " JMSTimestamp=12345678 OR 78766 = JMSTimestamp AND (JMSTimestamp= 1 + 4878787)";
|
||||
|
||||
Assert.assertEquals(" HQTimestamp=12345678 OR 78766 = HQTimestamp AND (HQTimestamp= 1 + 4878787)",
|
||||
Assert.assertEquals(" AMQTimestamp=12345678 OR 78766 = AMQTimestamp AND (AMQTimestamp= 1 + 4878787)",
|
||||
SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
checkNoSubstitute("JMSTimestamp");
|
||||
|
||||
selector = "animal = 'lion' JMSTimestamp = 321 OR animal_name = 'xyzJMSTimestampxyz'";
|
||||
|
||||
Assert.assertEquals("animal = 'lion' HQTimestamp = 321 OR animal_name = 'xyzJMSTimestampxyz'",
|
||||
Assert.assertEquals("animal = 'lion' AMQTimestamp = 321 OR animal_name = 'xyzJMSTimestampxyz'",
|
||||
SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
}
|
||||
|
@ -152,22 +152,22 @@ public class SelectorTranslatorTest extends UnitTestCase
|
|||
{
|
||||
String selector = "JMSExpiration=12345678";
|
||||
|
||||
Assert.assertEquals("HQExpiration=12345678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals("AMQExpiration=12345678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " JMSExpiration=12345678";
|
||||
|
||||
Assert.assertEquals(" HQExpiration=12345678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
Assert.assertEquals(" AMQExpiration=12345678", SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " JMSExpiration=12345678 OR 78766 = JMSExpiration AND (JMSExpiration= 1 + 4878787)";
|
||||
|
||||
Assert.assertEquals(" HQExpiration=12345678 OR 78766 = HQExpiration AND (HQExpiration= 1 + 4878787)",
|
||||
Assert.assertEquals(" AMQExpiration=12345678 OR 78766 = AMQExpiration AND (AMQExpiration= 1 + 4878787)",
|
||||
SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
checkNoSubstitute("JMSExpiration");
|
||||
|
||||
selector = "animal = 'lion' JMSExpiration = 321 OR animal_name = 'xyzJMSExpirationxyz'";
|
||||
|
||||
Assert.assertEquals("animal = 'lion' HQExpiration = 321 OR animal_name = 'xyzJMSExpirationxyz'",
|
||||
Assert.assertEquals("animal = 'lion' AMQExpiration = 321 OR animal_name = 'xyzJMSExpirationxyz'",
|
||||
SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
}
|
||||
|
@ -175,15 +175,15 @@ public class SelectorTranslatorTest extends UnitTestCase
|
|||
@Test
|
||||
public void testParseJMSCorrelationID()
|
||||
{
|
||||
String selector = "JMSCorrelationID='ID:HQ-12435678";
|
||||
String selector = "JMSCorrelationID='ID:AMQ-12435678";
|
||||
|
||||
Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " JMSCorrelationID='ID:HQ-12435678";
|
||||
selector = " JMSCorrelationID='ID:AMQ-12435678";
|
||||
|
||||
Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " JMSCorrelationID = 'ID:HQ-12435678";
|
||||
selector = " JMSCorrelationID = 'ID:AMQ-12435678";
|
||||
|
||||
Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
|
@ -191,7 +191,7 @@ public class SelectorTranslatorTest extends UnitTestCase
|
|||
|
||||
Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
selector = " myHeader = JMSCorrelationID OR (JMSCorrelationID = 'ID-HQ' + '12345')";
|
||||
selector = " myHeader = JMSCorrelationID OR (JMSCorrelationID = 'ID-AMQ' + '12345')";
|
||||
|
||||
Assert.assertEquals(selector, SelectorTranslator.convertToActiveMQFilterString(selector));
|
||||
|
||||
|
|
Loading…
Reference in New Issue