2.6. Migrating JMS-administered Objects and Bridges

HornetQ creates and deploys JMS connection factories, destinations, and bridges differently to JBoss Messaging.
In JBoss Messaging, JMS objects and bridges are configured as MBean services within the application server. In HornetQ, these are implemented as POJOs.
To migrate the configuration of these objects and bridges from JBoss Messaging to HornetQ, you must understand how parameters map from JBoss Messaging to HornetQ.
Table 2.3, “JMS Connection Factory Configuration Mappings” maps these parameters. Unless otherwise described, all HornetQ Object and Bridge attributes are specified in JBOSS_DIST/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-jms.xml. Appendix A, Configuration Reference contains all supported directives for hornetq-jms.xml.

Table 2.3. JMS Connection Factory Configuration Mappings

JBoss Messaging ConnectionFactory Attributes HornetQ JMS ConnectionFactory Attributes
ClientID connection-factory.client-id
JNDIBindings connection-factory.entries
PrefetchSize connection-factory.consumer-window-size
SlowConsumers N/A - equivalent to consumer-window-size=0
StrictTck N/A
SendAcksAsync connection-factory.block-on-acknowledge
DefaultTempQueueFullSize, DefaultTempQueuePageSize, DefaultTempQueueDownCacheSize N/A
DupsOKBatchSize connection-factory.dups-ok-batch-size
SupportsLoadBalancing N/A
SupportsFailover N/A
DisableRemotingChecks N/A
LoadBalancingFactory connection-factory.connection-load-balancing-policy-class-name
Connector connection-factory.connectors
EnableOrderingGroup, DefaultOrderingGroup N/A
Table 2.4, “JMS Queue Configuration Mappings” describes how JBoss Messaging Queue attributes map to HornetQ JMS Queue attributes. Unless otherwise specified, these attributes are defined in <JBOSS_HOME>/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-configuration.xml. If not specified in hornetq-configuration.xml, they are specified in JBOSS_DIST/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-jms.xml.

Table 2.4. JMS Queue Configuration Mappings

JBoss Messaging Queue Attributes HornetQ JMS Queue Attributes
Name queue.name - defined in hornetq-jms.xml
JNDIName queue.entry - defined in hornetq-jms.xml
DLQ address-settings.dead-letter-address
ExpiryQueue address-settings.expiry-address
RedeliveryDelay address-settings.redelivery-delay
MaxDeliveryAttempts address-settings.max-delivery-attempts
SecurityConfig security-settings
FullSize address-settings.max-size-bytes - HornetQ paging attributes do not exactly match JBoss Messaging paging attributes. Refer to the appropriate chapter for details.
PageSize address-settings.page-size-bytes - HornetQ paging attributes do not exactly match JBoss Messaging paging attributes. Refer to the appropriate chapter for details.
DownCacheSize Not Supported
CreatedProgrammatically Refer to org.hornetq.api.jms.management.JMSQueueControl to retrieve this attribute.
MessageCount Refer to org.hornetq.api.jms.management.JMSQueueControl to retrieve this attribute.
ScheduledMessageCount Refer to org.hornetq.api.jms.management.JMSQueueControl to retrieve this attribute.
MessageCounter Refer to org.hornetq.api.jms.management.JMSQueueControl to retrieve this attribute.
MessageCounterStatistics Refer to org.hornetq.api.jms.management.JMSQueueControl to retrieve this attribute.
ConsumerCount Refer to org.hornetq.api.jms.management.JMSQueueControl to retrieve this attribute.
DropOldMessageOnRedeploy Not Supported
MaxSize Not Supported
Clustered Not Supported
Table 2.5, “JMS Topic Configuration Mappings”<JBOSS_HOME>/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-configuration.xml describes how JBoss Messaging Topic attributes map to HornetQ JMS Topic attributes. Unless otherwise specified, these attributes are defined in JBOSS_DIST/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-jms.xml.

Table 2.5. JMS Topic Configuration Mappings

JBoss Messaging Topic Attributes HornetQ JMS Topic Attributes
Name topic.name - defined in hornetq-jms.xml
JNDIName topic.entry - defined in hornetq-jms.xml
DLQ address-settings.dead-letter-address
ExpiryQueue address-settings.expiry-address
RedeliveryDelay address-settings.redelivery-delay
MaxDeliveryAttempts address-settings.max-delivery-attempts
SecurityConfig security-settings
FullSize address-settings.max-size-bytes - HornetQ paging attributes do not exactly match JBoss Messaging paging attributes. Refer to the appropriate chapter for details.
PageSize address-settings.page-size-bytes - HornetQ paging attributes do not exactly match JBoss Messaging paging attributes. Refer to the appropriate chapter for details.
DownCacheSize N/A
CreatedProgrammatically Refer to org.hornetq.api.jms.management.TopicControl to retrieve this attribute.
MessageCounterHistoryDayLimit Refer to org.hornetq.api.jms.management.TopicControl to retrieve this attribute.
MessageCounters Refer to org.hornetq.api.jms.management.TopicControl to retrieve this attribute.
AllMessageCount Refer to org.hornetq.api.jms.management.TopicControl to retrieve this attribute.
DurableMessageCount Refer to org.hornetq.api.jms.management.TopicControl to retrieve this attribute.
NonDurableMessageCount Refer to org.hornetq.api.jms.management.TopicControl to retrieve this attribute.
AllSubscriptionsCount Refer to org.hornetq.api.jms.management.TopicControl to retrieve this attribute.
DurableSubscriptionsCount Refer to org.hornetq.api.jms.management.TopicControl to retrieve this attribute.
NonDurableSubscriptionsCount Refer to org.hornetq.api.jms.management.TopicControl to retrieve this attribute.
MaxSize N/A
Clustered N/A
DropOldMessageOnRedeploy N/A
The table below shows how JBoss Messaging Bridge attributes map to HornetQ JMS Bridge attributes. HornetQ's JMS Bridge attributes are defined in its Bean configuration files. Refer to Chapter 31, The JMS Bridge for further details.

Table 2.6. JMS Bridge Configuration Mappings

JBoss Messaging Topic Attributes HornetQ JMS Topic Attributes
SourceProviderLoader SourceCFF
TargetProviderLoader TargetCFF
SourceDestinationLookup SourceDestinationFactory
TargetDestinationLookup TargetDestinationFactory
SourceUsername Source user name parameter
SourcePassword Source user password parameter
TargetUsername Target user name parameter
TargetPassword Target password parameter
QualityOfServiceMode Quality of Service parameter
Selector Selector parameter
MaxBatchSize Max batch size parameter
MaxBatchTime Max batch time parameter
SubName Subscription name parameter
ClientID Client ID parameter
FailureRetryInterval Failure retry interval parameter
MaxRetries Max retry times parameter
AddMessageIDInHeader Add Message ID in Header parameter