activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcelo Jabali <mjab...@fusesource.com>
Subject Re: Keeping the messages in a queue or topic during a day
Date Mon, 30 May 2011 20:17:08 GMT
Composite destinations may help a bit in this case too.

Something like:

   String brokerURI = ActiveMQConnectionFactory.DEFAULT_BROKER_URL;

ConnectionFactory connectionFactory = new
ActiveMQConnectionFactory(brokerURI); Connection connection =
connectionFactory.createConnection();

connection.start();


Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);

Queue ordersDestination = session.createQueue("store.orders, topic://

store.orders");

MessageProducer producer = session.createProducer(ordersDestination);

Message order = session.createObjectMessage();

producer.send(order);



On Mon, May 30, 2011 at 1:13 PM, Gary Tully <gary.tully@gmail.com> wrote:

> Use durable topic subscriptions and message time to live of 1 day.
> Virtual topics allow multiple consumers to share a subscription which could
> be usefull in the alert/logging system.
> A more customisable option is available via the pending message limit
> strategies for non durable topic subs. You can define your own message
> eviction strategy.
>  On 30 May 2011 19:22, "serious" <serious.seb@orange.fr> wrote:
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message