Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A message is just a record in a table which has a timestamp (which determines the ordering), and other fields.

A sender can send to a queue or a topic.  A queue has a receiver pulling messages.  A topic will just distribute to 1 or more queues.

Receivers need to receive the message then mark it as processed when done.

Message columns

Column nameDescription
 ID 
  
  

...

db uuid for this row

...

...

HIBERNATE_VERSION_NUMBER

...

/** constant for field name for: contextId */
public static final String FIELD_CONTEXT_ID = "contextId";

/** constant for field name for: id */
public static final String FIELD_ID = "id";

...

incrementing number so two updates dont occur at once (optimistic locking)
SENT_TIME_MICROSmicroseconds since 1970 this message was sent (note this is probably unique, but not necessarily

...

GET_ATTEMPT_TIME_

...

MILLISmilliseconds that the message was attempted to be received

...

...

GET_ATTEMPT_

...

COUNThow many times this message has been attempted to be retrieved

...

STATEstate of this message: IN_QUEUE, GET_ATTEMPTED, PROCESSED

...

GET_TIME_MILLISmillis since 1970 that this message was successfully received

...

FROM_MEMBER_IDmember id of user who sent the message

...

TO_MEMBER_ID

...

...

member id of user who is receiving the message

...

QUEUE_OR_TOPIC_NAMEqueue or topic name for the

...

message

...

...

MESSAGE_BODY

...

 

...

message body