You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by raxlee <80...@sohu.com> on 2006/10/18 12:47:31 UTC

the consumer cant't receive message from the activemq broker

hello.all
          i run a activemq on linux os,the version of activemq is v4.0.1.i
use the queue form .and tcp for transaction
i just start one broker supply the service to many producers and consumers.
         when i run a activemq test programme.the process for producer and
consumer is with high speed.
         but when i run my server use the activemq.after the system running
several days,i found that the   
         consumers receive the message from the activemq with low
speed.however,the consumer can't receive any
         message despite there is many message remain in the queue.the
consumers can receive the message 
         again  when i restart the activemq server.
         i found another question:after the producer sending many messages,i
try to close the connection.and then i 
        reconnect the activemq broker,the consumer can't receive the remain
message in the queue.why?

         i don't konw what causes that.my server is not busy from the cpu
info and the memory.
         my activemq.xml  like the follow

        <!-- START SNIPPET: example -->
<beans xmlns="http://activemq.org/config/1.0">

  <!-- Allows us to use system properties as variables in this configuration
file -->
  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

  <broker useJmx="true">

    <!--  Use the following to set the broker memory limit (in bytes)-->
    <memoryManager>
        <usageManager id="memory-manager" limit="204800000"/>
    </memoryManager>

    <!-- Use the following to configure how ActiveMQ is exposed in JMX
    <managementContext>
       <managementContext connectorPort="1099"
jmxDomainName="org.apache.activemq"/>
    </managementContext>
    -->
    <plugins>
      <!--  use JAAS to authenticate using the login.config file on the
classpath to configure JAAS -->
      <jaasAuthenticationPlugin configuration="activemq-domain" />

      <!--  lets configure a destination based authorization mechanism -->
      <authorizationPlugin>
        <map>
          <authorizationMap>
            <authorizationEntries>
              <authorizationEntry queue=">" read="admins" write="admins"
admin="admins" />
              <authorizationEntry queue="com.moloon.smschat.server.>"
read="users" write="users" admin="users" />
              <authorizationEntry queue="*" read="users" write="users"
admin="users" />
              <authorizationEntry topic=">" read="admins" write="admins"
admin="admins" />
              <authorizationEntry topic="com.moloon.smschat.server.>"
read="users" write="users" admin="users" />
              <authorizationEntry topic="*" read="users" write="users"
admin="users" />

              <authorizationEntry topic="ActiveMQ.Advisory.>"
read="guests,users" write="guests,users" admin="guests,users"/>
            </authorizationEntries>
          </authorizationMap>
        </map>
      </authorizationPlugin>
    </plugins>
 <!-- In ActiveMQ 4, you can setup destination policies -->
    <destinationPolicy>
      <policyMap><policyEntries>

          <policyEntry topic="FOO.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

      </policyEntries></policyMap>
    </destinationPolicy>


    <persistenceAdapter>
     <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.home}/activemq-data"/>
      <!-- To use a different datasource, use th following syntax : -->
      <!--<journaledJDBC journalLogFiles="5" dataSource="#oracle-ds"/>-->
    </persistenceAdapter>

    <transportConnectors>
      <transportConnector name="default"
uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=30000" />
      <!--<transportConnector name="default"
uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=60000"
discoveryUri="multic
ast://default"/>-->
      <!--<transportConnector name="stomp"  
uri="stomp://localhost:61613"/>-->
    </transportConnectors>

    <networkConnectors>
      <!-- by default just auto discover the other brokers -->
     <!-- <networkConnector name="default" uri="multicast://default"/>-->
      <!--
      <networkConnector name="host1 and host2"
uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/>
      -->
    </networkConnectors>

  </broker>

       my producer.java like follow
     
      

many thanks
-- 
View this message in context: http://www.nabble.com/the-consumer-cant%27t-receive-message-from-the-activemq-broker-tf2465777.html#a6873607
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: the consumer cant't receive message from the activemq broker

Posted by raxlee <80...@sohu.com>.
hi,james

     thank you for your help

     i use the reconnect style for the consumer

     i found some exception stack just now,the error like follow

    2006-10-15 22:52:21,345 [206.80.72:44689] ERROR ManagedRegionBroker           
- Failed to register destination queue://com.moloon.s
mschat.server.AllMOQueue
javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Queue,Destination=com.moloon.smschat.
server.AllMOQueue
        at mx4j.server.MX4JMBeanServer.register(MX4JMBeanServer.java:880)
        at
mx4j.server.MX4JMBeanServer.registerImpl(MX4JMBeanServer.java:807)
        at
mx4j.server.MX4JMBeanServer.registerMBeanImpl(MX4JMBeanServer.java:746)
        at
mx4j.server.MX4JMBeanServer.registerMBean(MX4JMBeanServer.java:730)
        at
org.apache.activemq.broker.jmx.ManagedRegionBroker.registerDestination(ManagedRegionBroker.java:215)
        at
org.apache.activemq.broker.jmx.ManagedRegionBroker.register(ManagedRegionBroker.java:143)
        at
org.apache.activemq.broker.jmx.ManagedQueueRegion.createDestination(ManagedQueueRegion.java:57)
        at
org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:77)
        at
org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:217)
        at
org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:129)
        at
org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:141)
        at
org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:129)
        at
org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:129)
        at
org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:129)
        at
org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:67)
        at
org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:142)
        at
org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:161)
        at
org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:293)
        at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
        at
org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:77)
        at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
        at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
        at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
        at
org.apache.activemq.security.AuthorizationBroker.addConsumer(AuthorizationBroker.java:125)
        at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:86)
        at
org.apache.activemq.broker.AbstractConnection.processAddConsumer(AbstractConnection.java:427)
        at
org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:295)
        at
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
        at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
        at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
        at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:143)
        at java.lang.Thread.run(Thread.java:534)


        2006-10-15 22:52:05,994 [48.45.110:37184] INFO  Service                       
- Sync error occurred: java.lang.IllegalStateExceptio
n: Broker has been stopped:
org.apache.activemq.broker.BrokerService$2@13c59de
java.lang.IllegalStateException: Broker has been stopped:
org.apache.activemq.broker.BrokerService$2@13c59de
        at
org.apache.activemq.broker.ErrorBroker.removeConsumer(ErrorBroker.java:140)
        at
org.apache.activemq.broker.MutableBrokerFilter.removeConsumer(MutableBrokerFilter.java:114)
        at
org.apache.activemq.broker.AbstractConnection.processRemoveConsumer(AbstractConnection.java:445)
        at org.apache.activemq.command.RemoveInfo.visit(RemoveInfo.java:63)
        at
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
        at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
        at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
        at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:143)
        at java.lang.Thread.run(Thread.java:534)


         before the exception ,the reconnection consumer thread start.

         it seems that,when the connection is interrupted abnormally,the old
consumer of the queue is not destoryed when the connection is
interrupted.that may be the reason of my problem

         why is it?

         can you tell me how to deal with it,how to solve it?
   
         why the broker can recognize the new consumer as the old one who
can't be destoryed?

         can i modify the consumer of reconnection's identifier in order to
avoid the broker recognizing the consumer as the old one?

  many thanks

James.Strachan wrote:
> 
> Could you try use 4.0.2 and see if you can reproduce these issues -
> some issues were fixed to do with consumers reconnecting causing
> problems.
> 
> On 10/18/06, raxlee <80...@sohu.com> wrote:
>>
>> hello.all
>>           i run a activemq on linux os,the version of activemq is
>> v4.0.1.i
>> use the queue form .and tcp for transaction
>> i just start one broker supply the service to many producers and
>> consumers.
>>          when i run a activemq test programme.the process for producer
>> and
>> consumer is with high speed.
>>          but when i run my server use the activemq.after the system
>> running
>> several days,i found that the
>>          consumers receive the message from the activemq with low
>> speed.however,the consumer can't receive any
>>          message despite there is many message remain in the queue.the
>> consumers can receive the message
>>          again  when i restart the activemq server.
>>          i found another question:after the producer sending many
>> messages,i
>> try to close the connection.and then i
>>         reconnect the activemq broker,the consumer can't receive the
>> remain
>> message in the queue.why?
>>
>>          i don't konw what causes that.my server is not busy from the cpu
>> info and the memory.
>>          my activemq.xml  like the follow
>>
>>         <!-- START SNIPPET: example -->
>> <beans xmlns="http://activemq.org/config/1.0">
>>
>>   <!-- Allows us to use system properties as variables in this
>> configuration
>> file -->
>>   <bean
>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>>
>>   <broker useJmx="true">
>>
>>     <!--  Use the following to set the broker memory limit (in bytes)-->
>>     <memoryManager>
>>         <usageManager id="memory-manager" limit="204800000"/>
>>     </memoryManager>
>>
>>     <!-- Use the following to configure how ActiveMQ is exposed in JMX
>>     <managementContext>
>>        <managementContext connectorPort="1099"
>> jmxDomainName="org.apache.activemq"/>
>>     </managementContext>
>>     -->
>>     <plugins>
>>       <!--  use JAAS to authenticate using the login.config file on the
>> classpath to configure JAAS -->
>>       <jaasAuthenticationPlugin configuration="activemq-domain" />
>>
>>       <!--  lets configure a destination based authorization mechanism
>> -->
>>       <authorizationPlugin>
>>         <map>
>>           <authorizationMap>
>>             <authorizationEntries>
>>               <authorizationEntry queue=">" read="admins" write="admins"
>> admin="admins" />
>>               <authorizationEntry queue="com.moloon.smschat.server.>"
>> read="users" write="users" admin="users" />
>>               <authorizationEntry queue="*" read="users" write="users"
>> admin="users" />
>>               <authorizationEntry topic=">" read="admins" write="admins"
>> admin="admins" />
>>               <authorizationEntry topic="com.moloon.smschat.server.>"
>> read="users" write="users" admin="users" />
>>               <authorizationEntry topic="*" read="users" write="users"
>> admin="users" />
>>
>>               <authorizationEntry topic="ActiveMQ.Advisory.>"
>> read="guests,users" write="guests,users" admin="guests,users"/>
>>             </authorizationEntries>
>>           </authorizationMap>
>>         </map>
>>       </authorizationPlugin>
>>     </plugins>
>>  <!-- In ActiveMQ 4, you can setup destination policies -->
>>     <destinationPolicy>
>>       <policyMap><policyEntries>
>>
>>           <policyEntry topic="FOO.>">
>>             <dispatchPolicy>
>>               <strictOrderDispatchPolicy />
>>             </dispatchPolicy>
>>             <subscriptionRecoveryPolicy>
>>               <lastImageSubscriptionRecoveryPolicy />
>>             </subscriptionRecoveryPolicy>
>>           </policyEntry>
>>
>>       </policyEntries></policyMap>
>>     </destinationPolicy>
>>
>>
>>     <persistenceAdapter>
>>      <journaledJDBC journalLogFiles="5"
>> dataDirectory="${activemq.home}/activemq-data"/>
>>       <!-- To use a different datasource, use th following syntax : -->
>>       <!--<journaledJDBC journalLogFiles="5" dataSource="#oracle-ds"/>-->
>>     </persistenceAdapter>
>>
>>     <transportConnectors>
>>       <transportConnector name="default"
>> uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=30000" />
>>       <!--<transportConnector name="default"
>> uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=60000"
>> discoveryUri="multic
>> ast://default"/>-->
>>       <!--<transportConnector name="stomp"
>> uri="stomp://localhost:61613"/>-->
>>     </transportConnectors>
>>
>>     <networkConnectors>
>>       <!-- by default just auto discover the other brokers -->
>>      <!-- <networkConnector name="default" uri="multicast://default"/>-->
>>       <!--
>>       <networkConnector name="host1 and host2"
>> uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/>
>>       -->
>>     </networkConnectors>
>>
>>   </broker>
>>
>>        my producer.java like follow
>>
>>
>>
>> many thanks
>> --
>> View this message in context:
>> http://www.nabble.com/the-consumer-cant%27t-receive-message-from-the-activemq-broker-tf2465777.html#a6873607
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/the-consumer-cant%27t-receive-message-from-the-activemq-broker-tf2465777.html#a6874303
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: the consumer cant't receive message from the activemq broker

Posted by James Strachan <ja...@gmail.com>.
Could you try use 4.0.2 and see if you can reproduce these issues -
some issues were fixed to do with consumers reconnecting causing
problems.

On 10/18/06, raxlee <80...@sohu.com> wrote:
>
> hello.all
>           i run a activemq on linux os,the version of activemq is v4.0.1.i
> use the queue form .and tcp for transaction
> i just start one broker supply the service to many producers and consumers.
>          when i run a activemq test programme.the process for producer and
> consumer is with high speed.
>          but when i run my server use the activemq.after the system running
> several days,i found that the
>          consumers receive the message from the activemq with low
> speed.however,the consumer can't receive any
>          message despite there is many message remain in the queue.the
> consumers can receive the message
>          again  when i restart the activemq server.
>          i found another question:after the producer sending many messages,i
> try to close the connection.and then i
>         reconnect the activemq broker,the consumer can't receive the remain
> message in the queue.why?
>
>          i don't konw what causes that.my server is not busy from the cpu
> info and the memory.
>          my activemq.xml  like the follow
>
>         <!-- START SNIPPET: example -->
> <beans xmlns="http://activemq.org/config/1.0">
>
>   <!-- Allows us to use system properties as variables in this configuration
> file -->
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>
>   <broker useJmx="true">
>
>     <!--  Use the following to set the broker memory limit (in bytes)-->
>     <memoryManager>
>         <usageManager id="memory-manager" limit="204800000"/>
>     </memoryManager>
>
>     <!-- Use the following to configure how ActiveMQ is exposed in JMX
>     <managementContext>
>        <managementContext connectorPort="1099"
> jmxDomainName="org.apache.activemq"/>
>     </managementContext>
>     -->
>     <plugins>
>       <!--  use JAAS to authenticate using the login.config file on the
> classpath to configure JAAS -->
>       <jaasAuthenticationPlugin configuration="activemq-domain" />
>
>       <!--  lets configure a destination based authorization mechanism -->
>       <authorizationPlugin>
>         <map>
>           <authorizationMap>
>             <authorizationEntries>
>               <authorizationEntry queue=">" read="admins" write="admins"
> admin="admins" />
>               <authorizationEntry queue="com.moloon.smschat.server.>"
> read="users" write="users" admin="users" />
>               <authorizationEntry queue="*" read="users" write="users"
> admin="users" />
>               <authorizationEntry topic=">" read="admins" write="admins"
> admin="admins" />
>               <authorizationEntry topic="com.moloon.smschat.server.>"
> read="users" write="users" admin="users" />
>               <authorizationEntry topic="*" read="users" write="users"
> admin="users" />
>
>               <authorizationEntry topic="ActiveMQ.Advisory.>"
> read="guests,users" write="guests,users" admin="guests,users"/>
>             </authorizationEntries>
>           </authorizationMap>
>         </map>
>       </authorizationPlugin>
>     </plugins>
>  <!-- In ActiveMQ 4, you can setup destination policies -->
>     <destinationPolicy>
>       <policyMap><policyEntries>
>
>           <policyEntry topic="FOO.>">
>             <dispatchPolicy>
>               <strictOrderDispatchPolicy />
>             </dispatchPolicy>
>             <subscriptionRecoveryPolicy>
>               <lastImageSubscriptionRecoveryPolicy />
>             </subscriptionRecoveryPolicy>
>           </policyEntry>
>
>       </policyEntries></policyMap>
>     </destinationPolicy>
>
>
>     <persistenceAdapter>
>      <journaledJDBC journalLogFiles="5"
> dataDirectory="${activemq.home}/activemq-data"/>
>       <!-- To use a different datasource, use th following syntax : -->
>       <!--<journaledJDBC journalLogFiles="5" dataSource="#oracle-ds"/>-->
>     </persistenceAdapter>
>
>     <transportConnectors>
>       <transportConnector name="default"
> uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=30000" />
>       <!--<transportConnector name="default"
> uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=60000"
> discoveryUri="multic
> ast://default"/>-->
>       <!--<transportConnector name="stomp"
> uri="stomp://localhost:61613"/>-->
>     </transportConnectors>
>
>     <networkConnectors>
>       <!-- by default just auto discover the other brokers -->
>      <!-- <networkConnector name="default" uri="multicast://default"/>-->
>       <!--
>       <networkConnector name="host1 and host2"
> uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/>
>       -->
>     </networkConnectors>
>
>   </broker>
>
>        my producer.java like follow
>
>
>
> many thanks
> --
> View this message in context: http://www.nabble.com/the-consumer-cant%27t-receive-message-from-the-activemq-broker-tf2465777.html#a6873607
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: the consumer cant't receive message from the activemq broker

Posted by James Strachan <ja...@gmail.com>.
BTW you can try the latest 4.0.2 RC here

http://hiramchirino.com/~chirino/incubator-activemq-4.0.2-RC6/maven1/incubator-activemq/distributions/

On 10/24/06, Hiram Chirino <hi...@hiramchirino.com> wrote:
> When the servers are back up.. I would recommend trying the latest release
> candidate of 4.0.2
>
> On 10/22/06, Matthew Xie <an...@163.com> wrote:
> >
> >
> > My problem is look like same to you. i run many producers and one consumer
> > to
> > transport messages on one queue.
> > after 4 or 5 days working, the consumers can't receive any messages. and
> > the
> > queue remains some messages. actually i can't send more messages to the mq
> > server. if i do it , it will suspend for a long time to connect or send
> > the
> > message out.(i am not sure).
> > here i am using activemq 4.0.1. anyone could do a favor?
> >
> > Thanks!
> > Matt.
> >
> >
> > raxlee wrote:
> > >
> > > hello.all
> > >           i run a activemq on linux os,the version of activemq is
> > v4.0.1.i
> > > use the queue form .and tcp for transaction
> > > i just start one broker supply the service to many producers and
> > > consumers.
> > >          when i run a activemq test programme.the process for producer
> > and
> > > consumer is with high speed.
> > >          but when i run my server use the activemq.after the system
> > > running several days,i found that the
> > >          consumers receive the message from the activemq with low
> > > speed.however,the consumer can't receive any
> > >          message despite there is many message remain in the queue.the
> > > consumers can receive the message
> > >          again  when i restart the activemq server.
> > >          i found another question:after the producer sending many
> > > messages,i try to close the connection.and then i
> > >         reconnect the activemq broker,the consumer can't receive the
> > > remain message in the queue.why?
> > >
> > >          i don't konw what causes that.my server is not busy from the
> > cpu
> > > info and the memory.
> > >          my activemq.xml  like the follow
> > >
> > >         <!-- START SNIPPET: example -->
> > > <beans xmlns="http://activemq.org/config/1.0">
> > >
> > >   <!-- Allows us to use system properties as variables in this
> > > configuration file -->
> > >   <bean
> > > class="
> > org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> > >
> > >   <broker useJmx="true">
> > >
> > >     <!--  Use the following to set the broker memory limit (in bytes)-->
> > >     <memoryManager>
> > >         <usageManager id="memory-manager" limit="204800000"/>
> > >     </memoryManager>
> > >
> > >     <!-- Use the following to configure how ActiveMQ is exposed in JMX
> > >     <managementContext>
> > >        <managementContext connectorPort="1099"
> > > jmxDomainName="org.apache.activemq"/>
> > >     </managementContext>
> > >     -->
> > >     <plugins>
> > >       <!--  use JAAS to authenticate using the login.config file on the
> > > classpath to configure JAAS -->
> > >       <jaasAuthenticationPlugin configuration="activemq-domain" />
> > >
> > >       <!--  lets configure a destination based authorization mechanism
> > -->
> > >       <authorizationPlugin>
> > >         <map>
> > >           <authorizationMap>
> > >             <authorizationEntries>
> > >               <authorizationEntry queue=">" read="admins" write="admins"
> > > admin="admins" />
> > >               <authorizationEntry queue="com.moloon.smschat.server.>"
> > > read="users" write="users" admin="users" />
> > >               <authorizationEntry queue="*" read="users" write="users"
> > > admin="users" />
> > >               <authorizationEntry topic=">" read="admins" write="admins"
> > > admin="admins" />
> > >               <authorizationEntry topic="com.moloon.smschat.server.>"
> > > read="users" write="users" admin="users" />
> > >               <authorizationEntry topic="*" read="users" write="users"
> > > admin="users" />
> > >
> > >               <authorizationEntry topic="ActiveMQ.Advisory.>"
> > > read="guests,users" write="guests,users" admin="guests,users"/>
> > >             </authorizationEntries>
> > >           </authorizationMap>
> > >         </map>
> > >       </authorizationPlugin>
> > >     </plugins>
> > >  <!-- In ActiveMQ 4, you can setup destination policies -->
> > >     <destinationPolicy>
> > >       <policyMap><policyEntries>
> > >
> > >           <policyEntry topic="FOO.>">
> > >             <dispatchPolicy>
> > >               <strictOrderDispatchPolicy />
> > >             </dispatchPolicy>
> > >             <subscriptionRecoveryPolicy>
> > >               <lastImageSubscriptionRecoveryPolicy />
> > >             </subscriptionRecoveryPolicy>
> > >           </policyEntry>
> > >
> > >       </policyEntries></policyMap>
> > >     </destinationPolicy>
> > >
> > >
> > >     <persistenceAdapter>
> > >      <journaledJDBC journalLogFiles="5"
> > > dataDirectory="${activemq.home}/activemq-data"/>
> > >       <!-- To use a different datasource, use th following syntax : -->
> > >       <!--<journaledJDBC journalLogFiles="5"
> > dataSource="#oracle-ds"/>-->
> > >     </persistenceAdapter>
> > >
> > >     <transportConnectors>
> > >       <transportConnector name="default"
> > > uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=30000" />
> > >       <!--<transportConnector name="default"
> > > uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=60000"
> > > discoveryUri="multic
> > > ast://default"/>-->
> > >       <!--<transportConnector name="stomp"
> > > uri="stomp://localhost:61613"/>-->
> > >     </transportConnectors>
> > >
> > >     <networkConnectors>
> > >       <!-- by default just auto discover the other brokers -->
> > >      <!-- <networkConnector name="default"
> > uri="multicast://default"/>-->
> > >       <!--
> > >       <networkConnector name="host1 and host2"
> > > uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/>
> > >       -->
> > >     </networkConnectors>
> > >
> > >   </broker>
> > >
> > >        my producer.java like follow
> > >
> > >
> > >
> > > many thanks
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/the-consumer-cant%27t-receive-message-from-the-activemq-broker-tf2465777.html#a6947375
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
> >
>
>
> --
> Regards,
> Hiram
>
> Blog: http://hiramchirino.com
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: the consumer cant't receive message from the activemq broker

Posted by Hiram Chirino <hi...@hiramchirino.com>.
When the servers are back up.. I would recommend trying the latest release
candidate of 4.0.2

On 10/22/06, Matthew Xie <an...@163.com> wrote:
>
>
> My problem is look like same to you. i run many producers and one consumer
> to
> transport messages on one queue.
> after 4 or 5 days working, the consumers can't receive any messages. and
> the
> queue remains some messages. actually i can't send more messages to the mq
> server. if i do it , it will suspend for a long time to connect or send
> the
> message out.(i am not sure).
> here i am using activemq 4.0.1. anyone could do a favor?
>
> Thanks!
> Matt.
>
>
> raxlee wrote:
> >
> > hello.all
> >           i run a activemq on linux os,the version of activemq is
> v4.0.1.i
> > use the queue form .and tcp for transaction
> > i just start one broker supply the service to many producers and
> > consumers.
> >          when i run a activemq test programme.the process for producer
> and
> > consumer is with high speed.
> >          but when i run my server use the activemq.after the system
> > running several days,i found that the
> >          consumers receive the message from the activemq with low
> > speed.however,the consumer can't receive any
> >          message despite there is many message remain in the queue.the
> > consumers can receive the message
> >          again  when i restart the activemq server.
> >          i found another question:after the producer sending many
> > messages,i try to close the connection.and then i
> >         reconnect the activemq broker,the consumer can't receive the
> > remain message in the queue.why?
> >
> >          i don't konw what causes that.my server is not busy from the
> cpu
> > info and the memory.
> >          my activemq.xml  like the follow
> >
> >         <!-- START SNIPPET: example -->
> > <beans xmlns="http://activemq.org/config/1.0">
> >
> >   <!-- Allows us to use system properties as variables in this
> > configuration file -->
> >   <bean
> > class="
> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> >
> >   <broker useJmx="true">
> >
> >     <!--  Use the following to set the broker memory limit (in bytes)-->
> >     <memoryManager>
> >         <usageManager id="memory-manager" limit="204800000"/>
> >     </memoryManager>
> >
> >     <!-- Use the following to configure how ActiveMQ is exposed in JMX
> >     <managementContext>
> >        <managementContext connectorPort="1099"
> > jmxDomainName="org.apache.activemq"/>
> >     </managementContext>
> >     -->
> >     <plugins>
> >       <!--  use JAAS to authenticate using the login.config file on the
> > classpath to configure JAAS -->
> >       <jaasAuthenticationPlugin configuration="activemq-domain" />
> >
> >       <!--  lets configure a destination based authorization mechanism
> -->
> >       <authorizationPlugin>
> >         <map>
> >           <authorizationMap>
> >             <authorizationEntries>
> >               <authorizationEntry queue=">" read="admins" write="admins"
> > admin="admins" />
> >               <authorizationEntry queue="com.moloon.smschat.server.>"
> > read="users" write="users" admin="users" />
> >               <authorizationEntry queue="*" read="users" write="users"
> > admin="users" />
> >               <authorizationEntry topic=">" read="admins" write="admins"
> > admin="admins" />
> >               <authorizationEntry topic="com.moloon.smschat.server.>"
> > read="users" write="users" admin="users" />
> >               <authorizationEntry topic="*" read="users" write="users"
> > admin="users" />
> >
> >               <authorizationEntry topic="ActiveMQ.Advisory.>"
> > read="guests,users" write="guests,users" admin="guests,users"/>
> >             </authorizationEntries>
> >           </authorizationMap>
> >         </map>
> >       </authorizationPlugin>
> >     </plugins>
> >  <!-- In ActiveMQ 4, you can setup destination policies -->
> >     <destinationPolicy>
> >       <policyMap><policyEntries>
> >
> >           <policyEntry topic="FOO.>">
> >             <dispatchPolicy>
> >               <strictOrderDispatchPolicy />
> >             </dispatchPolicy>
> >             <subscriptionRecoveryPolicy>
> >               <lastImageSubscriptionRecoveryPolicy />
> >             </subscriptionRecoveryPolicy>
> >           </policyEntry>
> >
> >       </policyEntries></policyMap>
> >     </destinationPolicy>
> >
> >
> >     <persistenceAdapter>
> >      <journaledJDBC journalLogFiles="5"
> > dataDirectory="${activemq.home}/activemq-data"/>
> >       <!-- To use a different datasource, use th following syntax : -->
> >       <!--<journaledJDBC journalLogFiles="5"
> dataSource="#oracle-ds"/>-->
> >     </persistenceAdapter>
> >
> >     <transportConnectors>
> >       <transportConnector name="default"
> > uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=30000" />
> >       <!--<transportConnector name="default"
> > uri="tcp://localhost:61616?wireFormat.maxInactivityDuration=60000"
> > discoveryUri="multic
> > ast://default"/>-->
> >       <!--<transportConnector name="stomp"
> > uri="stomp://localhost:61613"/>-->
> >     </transportConnectors>
> >
> >     <networkConnectors>
> >       <!-- by default just auto discover the other brokers -->
> >      <!-- <networkConnector name="default"
> uri="multicast://default"/>-->
> >       <!--
> >       <networkConnector name="host1 and host2"
> > uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/>
> >       -->
> >     </networkConnectors>
> >
> >   </broker>
> >
> >        my producer.java like follow
> >
> >
> >
> > many thanks
> >
>
> --
> View this message in context:
> http://www.nabble.com/the-consumer-cant%27t-receive-message-from-the-activemq-broker-tf2465777.html#a6947375
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com