You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by inchlin <in...@gmail.com> on 2007/01/18 02:16:26 UTC

How to compress payload in spring container?

Hi all:

I try to consume compressed message use spring container
But I can't make the the message compressed
How do I make it?
Thanks in advise!

This is my sample code to start the consumer

ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory();
connectionFactory.setBrokerURL(url);
connectionFactory.setUseCompression(true);
	
container = new DefaultMessageListenerContainer();		
container.setConnectionFactory(connectionFactory);
container.setMessageListener(this);
container.setDestinationName(subject);
container.setSessionTransacted(transacted);
container.setMessageListener(this);
container.setSubscriptionDurable(true);
container.afterPropertiesSet();
		
-- 
View this message in context: http://www.nabble.com/How-to-compress-payload-in-spring-container--tf3031651.html#a8423401
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: How to compress payload in spring container?

Posted by "James.Strachan" <ja...@gmail.com>.


inchlin wrote:
> 
> Hi all:
> 
> I try to consume compressed message use spring container
> But I can't make the the message compressed
> How do I make it?
> Thanks in advise!
> 
> This is my sample code to start the consumer
> 
> ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory();
> connectionFactory.setBrokerURL(url);
> connectionFactory.setUseCompression(true);
> 	
> container = new DefaultMessageListenerContainer();		
> container.setConnectionFactory(connectionFactory);
> container.setMessageListener(this);
> container.setDestinationName(subject);
> container.setSessionTransacted(transacted);
> container.setMessageListener(this);
> container.setSubscriptionDurable(true);
> container.afterPropertiesSet();
> 		
> 

You need to set the compression on the producer.

James
-- 
View this message in context: http://www.nabble.com/How-to-compress-payload-in-spring-container--tf3031651.html#a8435649
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.