You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kafka399 <ka...@gmail.com> on 2011/03/04 22:49:51 UTC
Duplicated messages
What can be reason for duplicated messages? I use jmsTemplate for messages
production, ActiveMQ as a broker and one Topic for the moment which saves
messages in database. I have up to 100 msg/s time to time.
Thank you in advance.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Duplicated-messages-tp3335982p3335982.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Duplicated messages
Posted by kafka399 <ka...@gmail.com>.
I had used Queue unintentionally until I found, that my configuration is
wrong, but the result was the same and the messages were duplicated. Anyway,
the topic is non-durable, so I don't see harm in it.
public void sende(Integer tickerId, Integer field, Integer size, Long
timestamp)
{
jmsTemplate.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
Map map = new HashMap();
map.put("tickerId", tickerId);
map.put("field", field);
map.put("size", size);
map.put("timestamp", timestamp);
jmsTemplate.convertAndSend("TopicName", map);
}
--
View this message in context: http://activemq.2283324.n4.nabble.com/Duplicated-messages-tp3335982p3338663.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Duplicated messages
Posted by Ron Piterman <ac...@piterman.net>.
To make sure messages are delivered once only, use a queue.
Greetings, RP
On 04.03.11 22:49, kafka399 wrote:
> What can be reason for duplicated messages? I use jmsTemplate for messages
> production, ActiveMQ as a broker and one Topic for the moment which saves
> messages in database. I have up to 100 msg/s time to time.
> Thank you in advance.
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Duplicated-messages-tp3335982p3335982.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>