Java Code Examples for org.apache.activemq.artemis.api.core.RoutingType#getType()
The following examples show how to use
org.apache.activemq.artemis.api.core.RoutingType#getType() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AMQPMessage.java From activemq-artemis with Apache License 2.0 | 6 votes |
@Override public final RoutingType getRoutingType() { ensureMessageDataScanned(); Object routingType = getMessageAnnotation(AMQPMessageSupport.ROUTING_TYPE); if (routingType != null) { return RoutingType.getType(((Number) routingType).byteValue()); } else { routingType = getMessageAnnotation(AMQPMessageSupport.JMS_DEST_TYPE_MSG_ANNOTATION); if (routingType != null) { if (AMQPMessageSupport.QUEUE_TYPE == ((Number) routingType).byteValue() || AMQPMessageSupport.TEMP_QUEUE_TYPE == ((Number) routingType).byteValue()) { return RoutingType.ANYCAST; } else if (AMQPMessageSupport.TOPIC_TYPE == ((Number) routingType).byteValue() || AMQPMessageSupport.TEMP_TOPIC_TYPE == ((Number) routingType).byteValue()) { return RoutingType.MULTICAST; } } else { return null; } return null; } }
Example 2
Source File: CoreMessage.java From activemq-artemis with Apache License 2.0 | 5 votes |
@Override public RoutingType getRoutingType() { if (containsProperty(Message.HDR_ROUTING_TYPE)) { return RoutingType.getType(getByteProperty(Message.HDR_ROUTING_TYPE)); } return null; }
Example 3
Source File: CreateSharedQueueMessage_V2.java From activemq-artemis with Apache License 2.0 | 5 votes |
@Override public void decodeRest(final ActiveMQBuffer buffer) { address = buffer.readSimpleString(); queueName = buffer.readSimpleString(); filterString = buffer.readNullableSimpleString(); durable = buffer.readBoolean(); routingType = RoutingType.getType(buffer.readByte()); requiresResponse = buffer.readBoolean(); if (buffer.readableBytes() > 0) { maxConsumers = BufferHelper.readNullableInteger(buffer); purgeOnNoConsumers = BufferHelper.readNullableBoolean(buffer); exclusive = BufferHelper.readNullableBoolean(buffer); lastValue = BufferHelper.readNullableBoolean(buffer); } if (buffer.readableBytes() > 0) { lastValueKey = buffer.readNullableSimpleString(); nonDestructive = BufferHelper.readNullableBoolean(buffer); consumersBeforeDispatch = BufferHelper.readNullableInteger(buffer); delayBeforeDispatch = BufferHelper.readNullableLong(buffer); groupRebalance = BufferHelper.readNullableBoolean(buffer); groupBuckets = BufferHelper.readNullableInteger(buffer); autoDelete = BufferHelper.readNullableBoolean(buffer); autoDeleteDelay = BufferHelper.readNullableLong(buffer); autoDeleteMessageCount = BufferHelper.readNullableLong(buffer); } if (buffer.readableBytes() > 0) { groupFirstKey = buffer.readNullableSimpleString(); } if (buffer.readableBytes() > 0) { ringSize = buffer.readNullableLong(); } if (buffer.readableBytes() > 0) { enabled = buffer.readNullableBoolean(); } }
Example 4
Source File: SessionQueueQueryResponseMessage_V3.java From activemq-artemis with Apache License 2.0 | 5 votes |
@Override public void decodeRest(final ActiveMQBuffer buffer) { super.decodeRest(buffer); autoCreated = buffer.readBoolean(); purgeOnNoConsumers = buffer.readBoolean(); routingType = RoutingType.getType(buffer.readByte()); maxConsumers = buffer.readInt(); if (buffer.readableBytes() > 0) { exclusive = BufferHelper.readNullableBoolean(buffer); lastValue = BufferHelper.readNullableBoolean(buffer); } if (buffer.readableBytes() > 0) { defaultConsumerWindowSize = BufferHelper.readNullableInteger(buffer); } if (buffer.readableBytes() > 0) { lastValueKey = buffer.readNullableSimpleString(); nonDestructive = BufferHelper.readNullableBoolean(buffer); consumersBeforeDispatch = BufferHelper.readNullableInteger(buffer); delayBeforeDispatch = BufferHelper.readNullableLong(buffer); groupRebalance = BufferHelper.readNullableBoolean(buffer); groupBuckets = BufferHelper.readNullableInteger(buffer); autoDelete = BufferHelper.readNullableBoolean(buffer); autoDeleteDelay = BufferHelper.readNullableLong(buffer); autoDeleteMessageCount = BufferHelper.readNullableLong(buffer); } if (buffer.readableBytes() > 0) { groupFirstKey = buffer.readNullableSimpleString(); } if (buffer.readableBytes() > 0) { ringSize = BufferHelper.readNullableLong(buffer); } if (buffer.readableBytes() > 0) { enabled = BufferHelper.readNullableBoolean(buffer); } }
Example 5
Source File: CreateQueueMessage_V2.java From activemq-artemis with Apache License 2.0 | 5 votes |
@Override public void decodeRest(final ActiveMQBuffer buffer) { super.decodeRest(buffer); autoCreated = buffer.readBoolean(); routingType = RoutingType.getType(buffer.readByte()); maxConsumers = buffer.readInt(); purgeOnNoConsumers = buffer.readBoolean(); if (buffer.readableBytes() > 0) { exclusive = BufferHelper.readNullableBoolean(buffer); lastValue = BufferHelper.readNullableBoolean(buffer); } if (buffer.readableBytes() > 0) { lastValueKey = buffer.readNullableSimpleString(); nonDestructive = BufferHelper.readNullableBoolean(buffer); consumersBeforeDispatch = BufferHelper.readNullableInteger(buffer); delayBeforeDispatch = BufferHelper.readNullableLong(buffer); groupRebalance = BufferHelper.readNullableBoolean(buffer); groupBuckets = BufferHelper.readNullableInteger(buffer); autoDelete = BufferHelper.readNullableBoolean(buffer); autoDeleteDelay = BufferHelper.readNullableLong(buffer); autoDeleteMessageCount = BufferHelper.readNullableLong(buffer); } if (buffer.readableBytes() > 0) { groupFirstKey = buffer.readNullableSimpleString(); } if (buffer.readableBytes() > 0) { ringSize = BufferHelper.readNullableLong(buffer); } if (buffer.readableBytes() > 0) { enabled = BufferHelper.readNullableBoolean(buffer); } }