docs icon indicating copy to clipboard operation
docs copied to clipboard

Document extras.headers attributes

Open mattheworiordan opened this issue 6 years ago • 12 comments

Whilst we added extras to messages, customers at present are not permitted to use any of these attributes (apart from push) as all attributes are reserved by Ably for future use.

We should reserve a single attribute such as metadata or headers for customers to use.

I think we generally agreed headers was best.

Note that in time, these custom headers may become more useful when we implement streaming query language functionality.

@paddybyers @SimonWoolf are you happy with me to create a PR to update the spec and documentation to reflect this?

┆Issue is synchronized with this Jira Task by Unito

mattheworiordan avatar Apr 12 '19 10:04 mattheworiordan

@paddybyers assigning to you to assign on please as I can't do this now, but I think would make sense to do so that we reducing the likelihood of introducing breaking changes down the line.

Do we convert this into a JIRA ticket then?

mattheworiordan avatar May 02 '20 14:05 mattheworiordan

To more closely follow other message patterns (i.e. HTTP), would headers be something that can appear at the top level, or are there established reasons it needs to be embedded within extras ?

JackUkleja avatar Jun 11 '20 09:06 JackUkleja

Extras is a root level attribute of the Message object. We added extras so that we had a flexible set of metadata attributes for a Message object, that could be used for anything we want. See Message in https://docs.ably.io/client-lib-development-guide/features/#idl.

If we added another attribute, we'd need to change every SDK and the protocol, and I don't see what the benefit of that would be. Why do you want this?

mattheworiordan avatar Jun 11 '20 23:06 mattheworiordan

headers is now permitted, and all other fields are now rejected by realtime. As such, rolling out documentation now to reflect this ASAP is important. cc @MarkWoulfeAbly

mattheworiordan avatar Aug 01 '20 14:08 mattheworiordan

when documenting this, pls note that headers must be a flat object, map<string, string> or equivalent - no further nesting.

(also we recommend that if using unenveloped reactor rules, header names should be ascii, as the headers will ultimately be turned into http/amqp/etc. headers)

SimonWoolf avatar Sep 14 '20 09:09 SimonWoolf

@tbedford can you please pick this up?

kavalerov avatar Mar 12 '21 16:03 kavalerov

@tbedford is this on your radar?

mattheworiordan avatar Apr 12 '22 13:04 mattheworiordan

➤ Tony Bedford commented:

I’ve put it at the top of the DOCS backlog for attention in the next sprint.

ably-sync-bot avatar Apr 13 '22 08:04 ably-sync-bot

➤ Tony Bedford commented:

Not sure why sync bot closed. I have put back on the backlog until I can take a look.

ably-sync-bot avatar Aug 17 '22 02:08 ably-sync-bot

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-2799

sync-by-unito[bot] avatar Oct 17 '22 17:10 sync-by-unito[bot]

@QuintinWillison this is an issue to document it, so probably docs rather than spec repo?

(the spec already says extras is an untyped object that sdks should treat opaquely, TM2i)

SimonWoolf avatar Oct 18 '22 14:10 SimonWoolf

Good spot, @SimonWoolf. Thanks. I'll transfer this back to the docs repository...

QuintinWillison avatar Oct 20 '22 16:10 QuintinWillison