activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elemur <pa...@lemur.org>
Subject Re: Queue messages to Remote Brokers/Subscribers not seen
Date Tue, 20 Oct 2009 20:08:09 GMT

Thanks for the quick response, let me supply a little more information.

My server configuration for ActiveMQ in spring is as follows:

        <amq:broker persistent="true" useJmx="false"
brokerName="mainserver">
        <amq:networkConnectors>
            <amq:networkConnector name="default-nc"
                                prefetchSize="1"
                                duplex="true"
                                dynamicOnly="true"
                                networkTTL="3"
                                uri="multicast://default"/>
        </amq:networkConnectors>
        <amq:transportConnectors>
            <amq:transportConnector name="openwire"
uri="tcp://0.0.0.0:61616"
                                discoveryUri="multicast://default"/>
        </amq:transportConnectors>
    </amq:broker>

    <bean id="jmsConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory" 
                     destroy-method="stop">
      <property name="connectionFactory">
        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
          <property name="brokerURL" value="vm://localhost"/>
        </bean>
      </property>
    </bean>

    <amq:topic id="topicDestination" physicalName="TOPIC.notices"/>
    <amq:queue id="queueDestination" physicalName="QUEUE.exec"/>

So this gives me a locally running broker using multicast, tcp, and all that
good fun.  One note to make at this point is I see an interesting difference
in file naming in the data directory:

-rw-r--r-- 1 root root    0 Oct 20 15:51
hash-index-blob_TOPIC.notices-Subscriptions
-rw-r--r-- 1 root root 1025 Oct 20 15:51
hash-index-queue-data_queue#3a#2f#2fQUEUE.exec
-rw-r--r-- 1 root root    0 Oct 20 15:51 hash-index-topic-data_TOPIC.notices

Where the queue is created with the queue://QUEUE.exec prefix, while the
topic is not.  I'm not sure if that causes a naming mismatch when joining my
queue from the other system.

On the client application, my spring configuration is currently set to:


<amq:broker persistent="true" useJmx="false" brokerName="systembatch">
     <amq:networkConnectors>
          <amq:networkConnector name="default-nc"
                  
uri="static://(tcp://localhost:61616?jms.prefetchPolicy.all=1)"
                                        prefetchSize="1"
                                        duplex="true"
                                        conduitSubscriptions="false"
                                        networkTTL="6" >
          </amq:networkConnector>
     </amq:networkConnectors>
    <amq:transportConnectors>
      <amq:transportConnector uri="tcp://localhost:61615" />
    </amq:transportConnectors>
</amq:broker>

<amq:connectionFactory id="jmsConnectionFactory"
brokerURL="vm://localhost"/>

<amq:topic id="noticeTopicDestination" physicalName="TOPIC.notices"/>
<amq:queue id="execQueueDestination" physicalName="QUEUE.exec"/>

You can see I'm really trying to force the prefetch there, in case thats an
issue.  I'm only sending a few messages to test this as the queue is often
rather low volume.

So when I start up both sides of the application I can see it establish a
connection and it actually receives a few messages on the Topic.  After that
however it doesn't receive anymore and never responds to a queue message.

http://www.nabble.com/file/p25981634/activemq-client.log activemq-client.log 
http://www.nabble.com/file/p25981634/activemq-server.log activemq-server.log 

Attached are the log files from the client and server showing the connection
and the files being enqueued.  Any feedback as to where to look to get this
queue flowing would be really very helpful.  (And topic as well!)

Thanks,
paul




rajdavies wrote:
> 
> That config looks ok - dynamic only means that messages will only be  
> pulled across if there is an active subscriber.
> I did notice that you aren't setting a unique name for the broker  
> itself in the config? - This won't necessarily help - but will  make  
> it easier when reading through the logs - which is probably the next  
> thing you should do - send the logs :)
> 
> On 19 Oct 2009, at 21:35, elemur wrote:
> 
>>
>> Hi,
>>
>> I have a test ActiveMQ (5.3.0) setup where I have ActiveMQ running  
>> through a
>> spring-based configuration within my application.  I define a network
>> connector as multicast for my broker, and a transport connector with  
>> a tcp
>> connection and a multicast discovery URI.  One node sends the  
>> messages to
>> the local broker and the subscribers are on the other jvm connected  
>> to their
>> local broker.
>>
>> To test this setup I tried having my application send some queue  
>> messages
>> between the two points, broker to broker, and I have also used  
>> Hermes to
>> subscribe to the queues and topics directly.
>>
>> With using Hermes I can see the topic based messages flow across,  
>> but have
>> been unable to view queue messages either through the remote broker
>> subscription or via hermes.
>>
>> I was thinking this might be due to the prefetch limit, but even  
>> when adding
>> jms.prefetchPolicy.all=1 to my brokerURL in hermes, I still don't  
>> see queue
>> messages remotely.
>>
>> My server setting has the following configuration within spring (using
>> namespaces):
>>
>>        <amq:broker>
>>        <amq:networkConnectors>
>>            <amq:networkConnector name="default-nc"
>>                                prefetchSize="1"
>>                                dynamicOnly="true"
>>                                networkTTL="3"
>>                                uri="multicast://default"/>
>>        </amq:networkConnectors>
>>        <amq:transportConnectors>
>>            <amq:transportConnector name="openwire"
>> uri="tcp://0.0.0.0:61616"
>>                   discoveryUri="multicast://default"/>
>>        </amq:transportConnectors>
>>    </amq:broker>
>>
>> Is there a good place for me to start in debugging this?  It seems  
>> as if
>> this should be working but of course, if it was I would be seeing  
>> queue
>> messages presumably.
>>
>> Thanks!
>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Queue-messages-to-Remote-Brokers-Subscribers-not-seen-tp25965200p25965200.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> Rob Davies
> http://twitter.com/rajdavies
> I work here: http://fusesource.com
> My Blog: http://rajdavies.blogspot.com/
> I'm writing this: http://www.manning.com/snyder/
> 
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Queue-messages-to-Remote-Brokers-Subscribers-not-seen-tp25965200p25981634.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message