You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jevans12 <je...@harris.com> on 2006/05/04 18:35:48 UTC

AMQ 3.2.2 and Spring 2.0

Environment: Spring 2.0 M3, ActiveMQ 3.2.2

<!-- JMS Beans -->
	<bean id="connectionFactory"
		class="org.springframework.jms.connection.SingleConnectionFactory">
		<property name="targetConnectionFactory">
			<bean class="org.activemq.ActiveMQConnectionFactory">
				<property name="brokerURL" value="vm://localhost" />
				<property name="brokerXmlConfig" value="activemq.xml" />
				<property name="copyMessageOnSend" value="false" />
				<property name="useEmbeddedBroker" value="true" />
			</bean>
		</property>
	</bean>

	<bean id="jmsTemplate"
		class="org.springframework.jms.core.JmsTemplate">
		<property name="connectionFactory" ref="connectionFactory" />
		<property name="defaultDestination">
			<bean class="org.activemq.message.ActiveMQQueue">
				<constructor-arg
					value="queue://indication,topic://subscription" />
			</bean>
		</property>
		<property name="deliveryPersistent" value="false" />
	</bean>


<bean id="indicationPersisterContainer"
		class="org.springframework.jms.listener.DefaultMessageListenerContainer">		
		<property name="concurrentConsumers"
			value="${indication.persister.concurrent}" />
		<property name="connectionFactory" ref="connectionFactory" />
		<property name="destination">
			<bean class="org.activemq.message.ActiveMQQueue">
				<constructor-arg value="indication" />
			</bean>
		</property>
		<property name="messageListener" ref="indicationPersister" />
		<property name="taskExecutor">
			<bean
			
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
				<property name="queueCapacity" value="0" />
				<property name="threadFactory">
					<bean
						class="util.NamingThreadFactory">
						<property name="name"
							value="IndicationPersister" />
					</bean>
				</property>
			</bean>
		</property>
	</bean>

This is our setup for a queue. We are seeing failures when the concurrent
consumers is >3 consistently at 5 concurrent consumers
The removeConsumer call on DurableQueueBoundedMessageContainer is what makes
the thread die (depending on the timing). 
Consistently get this whole "replaing/removing client" log messages every
time it doesn't work.
The removal call is the culprit
INFO level output. Looking for any insight. thanks. 


Shutdown] INFO org.activemq.broker.impl.BrokerConnectorImpl - ActiveMQ
connector started: TcpTransportServerChannel@tcp://****:61616
[Shutdown] INFO org.activemq.broker.impl.BrokerContainerImpl - ActiveMQ JMS
Message Broker (ID:****-4389-1146512395248-0:0) has started
[Shutdown] INFO org.activemq.transport.vm.VmTransportServerChannel -
Listening for connections at: vm://localhost
[Shutdown] INFO org.activemq.broker.impl.BrokerConnectorImpl - ActiveMQ
connector started: VmTransportServerChannel@vm://localhost
[Shutdown] INFO org.activemq.ActiveMQConnectionFactory - Embedded JMS Broker
has started
[IndicationPersister-0] INFO org.activemq.broker.impl.BrokerContainerImpl -
Adding new client: ID:****-4389-1146512395248-4:0 on transport:
VmTransportChannel: null
[Shutdown] INFO org.activemq.broker.impl.BrokerContainerImpl - Got duplicate
client with id: ID:****-4389-1146512395248-4:0. Giving the existing client
5000 millis to prove it's alive.
[Shutdown] WARN org.activemq.broker.impl.BrokerClientImpl - Unknown Packet
received: RECEIPT_INFO: id = 3 Receipt{ brokerMessageCapacity = 100,
correlationId = '1' , brokerName = 'null' , clusterName = 'null' , exception
= null, failed = false }
[Shutdown] INFO org.activemq.broker.impl.BrokerContainerImpl - Replacing
client: ID:SC060270-4389-1146512395248-4:0 on transport: VmTransportChannel:
null (Client did not respond in time) with client on transport:
VmTransportChannel: null
[Shutdown] INFO org.activemq.broker.impl.BrokerContainerImpl - Removing
client: ID:SC060270-4389-1146512395248-4:0 on transport: VmTransportChannel:
null
[Shutdown] INFO org.activemq.broker.impl.BrokerContainerImpl - Adding new
client: ID:SC060270-4389-1146512395248-4:0 on transport: VmTransportChannel:
null

--
View this message in context: http://www.nabble.com/AMQ-3.2.2-and-Spring-2.0-t1558336.html#a4232827
Sent from the ActiveMQ - User forum at Nabble.com.


Re: AMQ 3.2.2 and Spring 2.0

Posted by James Strachan <ja...@gmail.com>.
On 5/4/06, jevans12 <je...@harris.com> wrote:
>
> Thanks for the reply! I am salivating over AMQ4 jmx support , but Im
> understanding that
> https://issues.apache.org/activemq/browse/AMQ-531?page=all
>
> is blocking us to use AMQ4.x with Spring 2.0. any thoughts?

BTW one work around is to just not use the XML configuration mechanism
with ActiveMQ and just use Java code (or regular Spring.xml) to
configure the broker.

Note that if you run a remote broker in another JVM, the JMS client
doesn't use xbean; so you can use spring 2 on the client then use
spring 1.x on the broker to configure it with xbean's XML
--

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

Re: AMQ 3.2.2 and Spring 2.0

Posted by jevans12 <je...@harris.com>.
Hey James,
Do you have any technical insight on this comment by Craig listed in this
xbean JIRA

http://jira.codehaus.org/browse/XB-7

Cheers,



 
--
View this message in context: http://www.nabble.com/AMQ-3.2.2-and-Spring-2.0-t1558336.html#a4236257
Sent from the ActiveMQ - User forum at Nabble.com.


Re: AMQ 3.2.2 and Spring 2.0

Posted by James Strachan <ja...@gmail.com>.
On 5/4/06, jevans12 <je...@harris.com> wrote:
>
>
> Wow this is some terrible news for me!


Agreed! We were quite shocked when everything changed under our feet in
spring 2.x.


anyway Is there an effort to backport
> bug fixes in AMQ4.x to AMQ3.X?


Thats tons of work. Its probably less work to rewrite xbean-spring to not
use Spring and to use  JAXB/Castor instead.

--

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

Re: AMQ 3.2.2 and Spring 2.0

Posted by jevans12 <je...@harris.com>.
Wow this is some terrible news for me! anyway Is there an effort to backport
bug fixes in AMQ4.x to AMQ3.X?
--
View this message in context: http://www.nabble.com/AMQ-3.2.2-and-Spring-2.0-t1558336.html#a4235841
Sent from the ActiveMQ - User forum at Nabble.com.


Re: AMQ 3.2.2 and Spring 2.0

Posted by James Strachan <ja...@gmail.com>.
It looks like the Spring guys are not gonna provide a reasonable hook for us
to use XBean on Spring 2.0

http://opensource.atlassian.com/projects/spring/browse/SPR-1677

so at some point someone is gonna have to rework and have a special Spring
2.0 version of XBean :(.

So I don't see us supporting Spring 2.0 for a while yet I'm afraid. If
anyone fancies volunteering to help get xbean-spring working on Spring
2.0we welcome patches :)


On 5/4/06, jevans12 <je...@harris.com> wrote:
>
>
> Thanks for the reply! I am salivating over AMQ4 jmx support , but Im
> understanding that
> https://issues.apache.org/activemq/browse/AMQ-531?page=all
>
> is blocking us to use AMQ4.x with Spring 2.0. any thoughts?
> --
> View this message in context:
> http://www.nabble.com/AMQ-3.2.2-and-Spring-2.0-t1558336.html#a4234902
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

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

Re: AMQ 3.2.2 and Spring 2.0

Posted by jevans12 <je...@harris.com>.
Thanks for the reply! I am salivating over AMQ4 jmx support , but Im 
understanding that 
https://issues.apache.org/activemq/browse/AMQ-531?page=all

is blocking us to use AMQ4.x with Spring 2.0. any thoughts?
--
View this message in context: http://www.nabble.com/AMQ-3.2.2-and-Spring-2.0-t1558336.html#a4234902
Sent from the ActiveMQ - User forum at Nabble.com.


Re: AMQ 3.2.2 and Spring 2.0

Posted by James Strachan <ja...@gmail.com>.
FWIW we recently had this bug found on ActiveMQ 4.x and was fixed in
the 4.0release if you wanna try that...
http://issues.apache.org/activemq/browse/AMQ-696

The current 4.0 build has this fix applied...
http://people.apache.org/~chirino/incubator-activemq-4.0/distributions/

On 5/4/06, jevans12 <je...@harris.com> wrote:
>
>
> Environment: Spring 2.0 M3, ActiveMQ 3.2.2
>
> <!-- JMS Beans -->
>         <bean id="connectionFactory"
>                 class="
> org.springframework.jms.connection.SingleConnectionFactory">
>                 <property name="targetConnectionFactory">
>                         <bean class="
> org.activemq.ActiveMQConnectionFactory">
>                                 <property name="brokerURL"
> value="vm://localhost" />
>                                 <property name="brokerXmlConfig" value="
> activemq.xml" />
>                                 <property name="copyMessageOnSend"
> value="false" />
>                                 <property name="useEmbeddedBroker"
> value="true" />
>                         </bean>
>                 </property>
>         </bean>
>
>         <bean id="jmsTemplate"
>                 class="org.springframework.jms.core.JmsTemplate">
>                 <property name="connectionFactory" ref="connectionFactory"
> />
>                 <property name="defaultDestination">
>                         <bean class="org.activemq.message.ActiveMQQueue">
>                                 <constructor-arg
>                                         value="queue://indication,topic://subscription"
> />
>                         </bean>
>                 </property>
>                 <property name="deliveryPersistent" value="false" />
>         </bean>
>
>
> <bean id="indicationPersisterContainer"
>                 class="
> org.springframework.jms.listener.DefaultMessageListenerContainer">
>                 <property name="concurrentConsumers"
>                         value="${indication.persister.concurrent}" />
>                 <property name="connectionFactory" ref="connectionFactory"
> />
>                 <property name="destination">
>                         <bean class="org.activemq.message.ActiveMQQueue">
>                                 <constructor-arg value="indication" />
>                         </bean>
>                 </property>
>                 <property name="messageListener" ref="indicationPersister"
> />
>                 <property name="taskExecutor">
>                         <bean
>
> class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
>                                 <property name="queueCapacity" value="0"
> />
>                                 <property name="threadFactory">
>                                         <bean
>                                                 class="
> util.NamingThreadFactory">
>                                                 <property name="name"
>                                                         value="IndicationPersister"
> />
>                                         </bean>
>                                 </property>
>                         </bean>
>                 </property>
>         </bean>
>
> This is our setup for a queue. We are seeing failures when the concurrent
> consumers is >3 consistently at 5 concurrent consumers
> The removeConsumer call on DurableQueueBoundedMessageContainer is what
> makes
> the thread die (depending on the timing).
> Consistently get this whole "replaing/removing client" log messages every
> time it doesn't work.
> The removal call is the culprit
> INFO level output. Looking for any insight. thanks.
>
>
> Shutdown] INFO org.activemq.broker.impl.BrokerConnectorImpl - ActiveMQ
> connector started: TcpTransportServerChannel@tcp://****:61616
> [Shutdown] INFO org.activemq.broker.impl.BrokerContainerImpl - ActiveMQ
> JMS
> Message Broker (ID:****-4389-1146512395248-0:0) has started
> [Shutdown] INFO org.activemq.transport.vm.VmTransportServerChannel -
> Listening for connections at: vm://localhost
> [Shutdown] INFO org.activemq.broker.impl.BrokerConnectorImpl - ActiveMQ
> connector started: VmTransportServerChannel@vm://localhost
> [Shutdown] INFO org.activemq.ActiveMQConnectionFactory - Embedded JMS
> Broker
> has started
> [IndicationPersister-0] INFO org.activemq.broker.impl.BrokerContainerImpl-
> Adding new client: ID:****-4389-1146512395248-4:0 on transport:
> VmTransportChannel: null
> [Shutdown] INFO org.activemq.broker.impl.BrokerContainerImpl - Got
> duplicate
> client with id: ID:****-4389-1146512395248-4:0. Giving the existing client
> 5000 millis to prove it's alive.
> [Shutdown] WARN org.activemq.broker.impl.BrokerClientImpl - Unknown Packet
> received: RECEIPT_INFO: id = 3 Receipt{ brokerMessageCapacity = 100,
> correlationId = '1' , brokerName = 'null' , clusterName = 'null' ,
> exception
> = null, failed = false }
> [Shutdown] INFO org.activemq.broker.impl.BrokerContainerImpl - Replacing
> client: ID:SC060270-4389-1146512395248-4:0 on transport:
> VmTransportChannel:
> null (Client did not respond in time) with client on transport:
> VmTransportChannel: null
> [Shutdown] INFO org.activemq.broker.impl.BrokerContainerImpl - Removing
> client: ID:SC060270-4389-1146512395248-4:0 on transport:
> VmTransportChannel:
> null
> [Shutdown] INFO org.activemq.broker.impl.BrokerContainerImpl - Adding new
> client: ID:SC060270-4389-1146512395248-4:0 on transport:
> VmTransportChannel:
> null
>
> --
> View this message in context:
> http://www.nabble.com/AMQ-3.2.2-and-Spring-2.0-t1558336.html#a4232827
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

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