jakartaee / messaging

Jakarta Messaging
https://eclipse.org/ee4j/messaging
Other
41 stars 33 forks source link

Last Will message support #177

Open glassfishrobot opened 8 years ago

glassfishrobot commented 8 years ago

MQTTv3 has a "Last Will" feature that JMS users would also benefit from. A developer registers a "Last Will" message when connecting to the server and when the connection is disconnected (intentionally, or unintentionally) the broker delivers the Last Will message to a destination that is defined during the session setup. This allows application developers and administrators to implement automated handling of error conditions without the need for a number of 3rd party or provider-specific tools.

The one improvement on the MQTT implementation would be to support a closing of the session without delivering the Last Will message, so you could support a scenario where the Last Will message is only delivered for unplanned disconnects.

API additions:

JMSContext.createLastWill(Destination dest, Message msg)
JMSContext.close(boolean doNotDeliverLastWill) // default to true
glassfishrobot commented 6 years ago
glassfishrobot commented 8 years ago

@glassfishrobot Commented Reported by mattrpav

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JMS_SPEC-177