Class PublishedMessageTracker
java.lang.Object
com.reallifedeveloper.common.infrastructure.persistence.BaseJpaEntity<Long>
com.reallifedeveloper.common.application.notification.PublishedMessageTracker
Keeps track of the most recently published message on a certain publication channel.
The publication channel can, for example, be an exchange in a messaging system.
- Author:
- RealLifeDeveloper
-
Constructor Summary
ConstructorsConstructorDescriptionPublishedMessageTracker(long lastPublishedMessageId, String publicationChannel) Creates a newPublishedMessageTrackerwith the id of the most recently published message on the given publication channel. -
Method Summary
Modifier and TypeMethodDescriptionGives the id of the most recently published message on the publication channel associated with thisPublishedMessageTracker.Gives the name of the publication channel for thisPublishedMessageTracker.voidsetLastPublishedMessageid(long newLastPublishedMessageId) Sets the id of the most recently published message on the publication channel associated with thisPublishedMessageTracker.Methods inherited from class com.reallifedeveloper.common.infrastructure.persistence.BaseJpaEntity
finalize, id
-
Constructor Details
-
PublishedMessageTracker
Creates a newPublishedMessageTrackerwith the id of the most recently published message on the given publication channel.- Parameters:
lastPublishedMessageId- the id of the most recently published message on the publication channelpublicationChannel- the name of the publication channel, e.g., the name of an exchange in a messaging system
-
-
Method Details
-
lastPublishedMessageId
Gives the id of the most recently published message on the publication channel associated with thisPublishedMessageTracker.- Returns:
- the id of the most recently published message
-
setLastPublishedMessageid
public void setLastPublishedMessageid(long newLastPublishedMessageId) Sets the id of the most recently published message on the publication channel associated with thisPublishedMessageTracker.- Parameters:
newLastPublishedMessageId- the new id of the most recently published message
-
publicationChannel
Gives the name of the publication channel for thisPublishedMessageTracker.- Returns:
- the name of the publication channel
-