I have this same issue too. Identical running HornetQ 2.1.2 Final integrated with Jboss 5.0.1 GA. Also if you look at the Queue's that Hornet Q set's up as part of the cluster there will be no consumers. Which on initial startup there is only one to begin with.
Config wise: Here are the main changes I've made from the default's
<message-counter-enabled>true</message-counter-enabled>
<!-- Jboss says setting this to true has big performance impact but without it being set you get a message resend loop ocuring. -->
<persist-delivery-count-before-delivery>false</persist-delivery-count-before-delivery>
<jmx-management-enabled>true</jmx-management-enabled>
<broadcast-group name="bg-group1">
<!--<local-bind-address>${jboss.bind.address:localhost}</local-bind-address>-->
<group-address>${jboss.partition.udpGroup:231.7.7.7}</group-address>
<group-port>9876</group-port>
<broadcast-period>5000</broadcast-period>
<connector-ref connector-name="netty"/>
</broadcast-group>
</broadcast-groups>
<discovery-groups>
<discovery-group name="dg-group1">
<!--<local-bind-address>${jboss.bind.address:localhost}</local-bind-address>-->
<group-address>${jboss.partition.udpGroup:231.7.7.7}</group-address>
<group-port>9876</group-port>
<refresh-timeout>10000</refresh-timeout>
</discovery-group>
</discovery-groups>
<cluster-connections>
<cluster-connection name="${jboss.cluster.name:HornetQCluster}">
<address>jms</address>
<use-duplicate-detection>true</use-duplicate-detection>
<forward-when-no-consumers>false</forward-when-no-consumers>
<max-hops>1</max-hops>
<discovery-group-ref discovery-group-name="dg-group1"/>
</cluster-connection>
</cluster-connections>
<broadcast-group name="bg-group1">
<!--<local-bind-address>${jboss.bind.address:localhost}</local-bind-address>-->
<group-address>${jboss.partition.udpGroup:231.7.7.7}</group-address>
<group-port>9876</group-port>
<broadcast-period>5000</broadcast-period>
<connector-ref connector-name="netty"/>
</broadcast-group>
</broadcast-groups>
<discovery-groups>
<discovery-group name="dg-group1">
<!--<local-bind-address>${jboss.bind.address:localhost}</local-bind-address>-->
<group-address>${jboss.partition.udpGroup:231.7.7.7}</group-address>
<group-port>9876</group-port>
<refresh-timeout>10000</refresh-timeout>
</discovery-group>
</discovery-groups>
<cluster-connections>
<cluster-connection name="${jboss.cluster.name:HornetQCluster}">
<address>jms</address>
<use-duplicate-detection>true</use-duplicate-detection>
<forward-when-no-consumers>false</forward-when-no-consumers>
<max-hops>1</max-hops>
<discovery-group-ref discovery-group-name="dg-group1"/>
</cluster-connection>
</cluster-connections>
Queue's are setup like this: Each Client Application sends a message to EmailIn, EmailIn then parses / builds the SMTP message and sends (using the same client code) to SMTPOut for the Client. So the communication between EmailIn is treated as an internal client that is sending to SMTPOut.
<!--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>100485760</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>BLOCK</address-full-policy>
</address-setting>
<!-- Client DQL settings. seems the ones in jboss.jar do not work. -->
<address-setting match="jms.queue.CM/EmailIn">
<dead-letter-address>jms.queue.CM/EmailInDLQ</dead-letter-address>
<redistribution-delay>0</redistribution-delay>
<max-delivery-attempts>3</max-delivery-attempts>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
</address-setting>
<address-setting match="jms.queue.Client/EmailSMTPOut">
<dead-letter-address>jms.queue.Client/EmailSMTPOutDLQ</dead-letter-address>
<redistribution-delay>0</redistribution-delay>
<max-delivery-attempts>3</max-delivery-attempts>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
</address-setting>