-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution:
Fixed
-
Affects Version/s:
3.1.1
-
-
-
-
Proposal:
Hide
Add new sub-section in Section 4 "Message receipt"
Under normal circumstances clients receive messages in response to subscriptions they have created. A client could also receive messages that do not match any of its explicit subscriptions. This can happen if the server automatically assigned a subscription to the client or while an UNSUBSCRIBE operation is in progress. The client MUST acknowledge any Publish Packet it receives according to the applicable QoS rules regardless of whether it elects to process the application message.
In WD13 line 1097 Unsubscribe response add:
The server MUST stop adding any new messages for delivery to the client.
The server MUST send an UNSUBACK packet.
The server MUST complete the delivery of any QoS 1 or QoS 2 messages which it has started to send to the client.
The server MAY continue to deliver any existing messages buffered for delivery to the client.
In section 3.1.1 (Line 1108 WD13) - description of UNSUBACK
remove the words 'and processing of' (as per input input spec)
Show
Add new sub-section in Section 4 "Message receipt"
Under normal circumstances clients receive messages in response to subscriptions they have created. A client could also receive messages that do not match any of its explicit subscriptions. This can happen if the server automatically assigned a subscription to the client or while an UNSUBSCRIBE operation is in progress. The client MUST acknowledge any Publish Packet it receives according to the applicable QoS rules regardless of whether it elects to process the application message.
In WD13 line 1097 Unsubscribe response add:
The server MUST stop adding any new messages for delivery to the client.
The server MUST send an UNSUBACK packet.
The server MUST complete the delivery of any QoS 1 or QoS 2 messages which it has started to send to the client.
The server MAY continue to deliver any existing messages buffered for delivery to the client.
In section 3.1.1 (Line 1108 WD13) - description of UNSUBACK
remove the words 'and processing of' (as per input input spec)
A client might be too busy to process any more work, so sends UNSUBSCRIBE to turn the flow off.
Alternatively, the client may be unaware that a backlog of messages exists and sends UNSUBSCRIBE.
There are at lesat three possible options:
1. The server delays sending the UNSUBACK until the backlog is cleared
2. Send the UNSUBACK and then send the messages
3. Send the UNSUBACK and then purge the messages
The client's last defense should it not want the messages is to disconnect and reconnect with cleanSession set to (1)
{"report":{"apdex":0.5,"isInitial":true,"journeyId":"1064e485-0e02-49fb-a000-7b6b0766aea3","key":"jira.project.issue.view-issue","navigationType":0,"readyForUser":3013.800000190735,"redirectCount":0,"resourceLoadedEnd":3233,"resourceLoadedStart":271.7000002861023,"resourceTiming":[{"duration":143.7999997138977,"initiatorType":"link","name":"https://issues.oasis-open.org/s/3edeca31ab9ba77980aae0809fbe7121-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/css/_super/batch.css","startTime":271.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":271.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":415.5,"responseStart":0,"secureConnectionStart":0},{"duration":146,"initiatorType":"link","name":"https://issues.oasis-open.org/s/7d2823769c2e7b66e860863fe879b7f8-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/css/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&richediton=true","startTime":272,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":272,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":418,"responseStart":0,"secureConnectionStart":0},{"duration":145.80000019073486,"initiatorType":"link","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.css","startTime":272.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":272.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":418.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":146.80000019073486,"initiatorType":"link","name":"https://issues.oasis-open.org/s/645acc233eb869f48a571293b8358a7d-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static-adgs/jira.webresources:global-static-adgs.css","startTime":272.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":272.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":419.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":146.69999980926514,"initiatorType":"link","name":"https://issues.oasis-open.org/s/a0dd6509771c1de0667aae5429c04cda-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static/jira.webresources:global-static.css","startTime":272.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":272.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":419.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":424.40000009536743,"initiatorType":"script","name":"https://issues.oasis-open.org/s/e5479157e7a0c08b005e6522f2f04104-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/js/_super/batch.js?locale=en-US","startTime":272.90000009536743,"connectEnd":470.5,"connectStart":421.6000003814697,"domainLookupEnd":421.6000003814697,"domainLookupStart":421.6000003814697,"fetchStart":272.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":470.6000003814697,"responseEnd":697.3000001907349,"responseStart":505.6000003814697,"secureConnectionStart":445.90000009536743},{"duration":2564.800000190735,"initiatorType":"script","name":"https://issues.oasis-open.org/s/83514d5d4e8543747b02042eafcdc99c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/js/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":273.5,"connectEnd":1167.9000000953674,"connectStart":1119,"domainLookupEnd":1119,"domainLookupStart":1119,"fetchStart":273.5,"redirectEnd":0,"redirectStart":0,"requestStart":1168,"responseEnd":2838.300000190735,"responseStart":1198.6000003814697,"secureConnectionStart":1143.1000003814697},{"duration":918.0999999046326,"initiatorType":"script","name":"https://issues.oasis-open.org/s/70bb2263e59e7e1f04fbd137c80b895b-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/aae1242f5fc81cc6a5bb8bc963ccda29/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en-US","startTime":278.1000003814697,"connectEnd":1168.8000001907349,"connectStart":1120.1000003814697,"domainLookupEnd":1120.1000003814697,"domainLookupStart":1120.1000003814697,"fetchStart":278.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1168.8000001907349,"responseEnd":1196.2000002861023,"responseStart":1195.2000002861023,"secureConnectionStart":1144.3000001907349},{"duration":927.5,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":278.5,"connectEnd":1169.7000002861023,"connectStart":1121.1000003814697,"domainLookupEnd":1121.1000003814697,"domainLookupStart":1121.1000003814697,"fetchStart":278.5,"redirectEnd":0,"redirectStart":0,"requestStart":1169.7000002861023,"responseEnd":1206,"responseStart":1204.6000003814697,"secureConnectionStart":1145.2000002861023},{"duration":921.5999999046326,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":278.7000002861023,"connectEnd":1172.3000001907349,"connectStart":1123.3000001907349,"domainLookupEnd":1123.3000001907349,"domainLookupStart":1123.3000001907349,"fetchStart":278.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1172.4000000953674,"responseEnd":1200.3000001907349,"responseStart":1199.3000001907349,"secureConnectionStart":1147.6000003814697},{"duration":930.0999999046326,"initiatorType":"script","name":"https://issues.oasis-open.org/s/cda37faab827dbdf305de8efe8282062-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.js?locale=en-US","startTime":278.80000019073486,"connectEnd":1174.2000002861023,"connectStart":1125.5,"domainLookupEnd":1125.5,"domainLookupStart":1125.5,"fetchStart":278.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":1174.9000000953674,"responseEnd":1208.9000000953674,"responseStart":1206.5,"secureConnectionStart":1150},{"duration":844.5999999046326,"initiatorType":"link","name":"https://issues.oasis-open.org/s/07245784f53abc49bad9d9d4d36c577a-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/cadc4f20cc5c138dee060d42cf85f220/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":279.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":279.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1123.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":925.0999999046326,"initiatorType":"script","name":"https://issues.oasis-open.org/rest/api/1.0/shortcuts/803004/a29179d70fa8562374ee16707692af77/shortcuts.js?context=issuenavigation&context=issueaction","startTime":279.30000019073486,"connectEnd":1175.7000002861023,"connectStart":1127.3000001907349,"domainLookupEnd":1127.3000001907349,"domainLookupStart":1127.3000001907349,"fetchStart":279.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":1176.3000001907349,"responseEnd":1204.4000000953674,"responseStart":1202.6000003814697,"secureConnectionStart":1151.3000001907349},{"duration":841.3999996185303,"initiatorType":"link","name":"https://issues.oasis-open.org/s/f77fd89aa211a76b20e9b0e63564383c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.css?jira.create.linked.issue=true&richediton=true","startTime":317.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":317.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1158.5,"responseStart":0,"secureConnectionStart":0},{"duration":2426.699999809265,"initiatorType":"script","name":"https://issues.oasis-open.org/s/41525c48ddceeb9b11e54085268fc285-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.js?jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":317.30000019073486,"connectEnd":2716.5,"connectStart":2667.800000190735,"domainLookupEnd":2667.800000190735,"domainLookupStart":2667.800000190735,"fetchStart":317.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":2716.5,"responseEnd":2744,"responseStart":2742.9000000953674,"secureConnectionStart":2691.800000190735},{"duration":2088.2999997138977,"initiatorType":"xmlhttprequest","name":"https://issues.oasis-open.org/rest/webResources/1.0/resources","startTime":829.2000002861023,"connectEnd":2886.6000003814697,"connectStart":2838.2000002861023,"domainLookupEnd":2838.2000002861023,"domainLookupStart":2838.2000002861023,"fetchStart":829.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":2886.800000190735,"responseEnd":2917.5,"responseStart":2916.6000003814697,"secureConnectionStart":2862.300000190735}],"threshold":1000,"fetchStart":0,"domainLookupStart":81,"domainLookupEnd":115,"connectStart":115,"connectEnd":204,"secureConnectionStart":144,"requestStart":204,"responseStart":262,"responseEnd":364,"domLoading":266,"domInteractive":3262,"domContentLoadedEventStart":3262,"domContentLoadedEventEnd":3315,"domComplete":3615,"loadEventStart":3615,"loadEventEnd":3618,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[],"measures":[],"correlationId":"85061c9b9e9eba","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":133,"dbReadsTimeInMs":27,"dbConnsTimeInMs":36,"applicationHash":"4d4040e0714d65b7fffa4801569d014c0b16eaa9","experiments":[]}}
Hmmm...
In 2, the client received messages for a topic which it potentially thinks it has unsubscribed from. I can see that creating a lot of interesting head scratching when debugging a problem.
In 1, this stops a broker being able to immediately return a packet, and means it has to maintain a bit state, I suspect. It's also rather hard to define 'backlog', especially if one's internal design is a non blocking queue of some sort - no action can be taken based on an observation (a sort of Heisenberg-like thing, eg checking isEmpty then doing something. Think of the problem of incrementing a volatile int field in java).
3 would be my preference. It does not necessarily require a purge... It does fit nicely with the client's expectations.
However, we could leave the door open to 1 and 3. They're indistinguishable to the client.