• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

ActiveMQ JMS

Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am newbie to JMS and trying my hands on it using ActiveMQ.

I want to know if there is any mechanism using which we can avoid publishing duplicate message to Topic(if same message is already present in that topic)? Or is there any way to just check & not consume ,what all messages are present in destination programatically?

Thanks in advance for your help.

Posts: 23879
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It is kinda common knowledge (okay, maybe it is not that common... ) that the application is responsible for de-duplication of messages. Even for durable subscribers, the level of service of "guaranteed delivery", only "guarantees" that you will get the messages. It does not guarantee that you will get each message only once... so, even if there is a mechanism to prevent the publisher from sending the same message twice, the subscriber can still get the same message twice.

To elaborate more, I don't think that ActiveMQ has any mechanism for this. And since you can't tell if you accidentally publish the same message twice, you can't use the message sequence numbers to de-duplicate the message -- as your subscribers will get the same message with two different sequence numbers. You need to put some kind of marker in your messages, and it will be the responsibility of your subscribers to de-duplicate them.

Rashmee Kulkarni
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Henry
Why is the word "abbreviation" so long? And this ad is so short?
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic