Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP binding for OpenMessaging specification #13

Open
duhengforever opened this issue Oct 25, 2018 · 1 comment
Open

HTTP binding for OpenMessaging specification #13

duhengforever opened this issue Oct 25, 2018 · 1 comment

Comments

@duhengforever
Copy link
Contributor

At present, many message middlewares on the cloud provide http services, such as SNS, SQS in AWS, MNS in Alibaba Cloud, etc., with the rapid spread of http2, there will be more messaging services using http transmission in the future.
So many users hope that OpenMessaging can provide binding to the http message service to help users quickly access the messaging services of various vendors.

@Jason918
Copy link
Member

I would like to propose a simple http binding first. The main idea is simple, and the message model in OMS consist of four parts, I just map these parts into http protocol. The version is put in the url. The message headers are put in http header and prefixed with OMS. The user properties are put in the request headers, and the message body is in the http body and we set Content-Type to application/octet-stream. For the example api in the specification, the http binding would be like the following.

POST /version/1.0.0?service=helloService HTTP/1.1

Host: openmessaging.cloud
Content-Type: application/octet-stream
Content-Length: 11
OMS-Message-Id: 7F00000100002873000000000004F49C
OMS-Born-Timestamp: 1533780827824
OMS-Born-Host: 172.24.0.101:10035
OMS-Store-Timestamp: 1533780827825
OMS-Store-Host: 172.24.0.102:52511
OMS-Expire-Time: 1533780830000
OMS-Priority: 1
OMS-Compression: gzip
OMS-Trace-Id: 1E0578887D3F18B4AAC22B64D2B00A5E
OMS-Transaction-Id: 1E0578887D3F18B4AAC22B64D2B40A62
OMS-Destination: orderQueue
OMS-Message-Key: orderId-103368921567
OMS-Delay-Time: 30000
OMS-Durability: 1
OMS-Correlation-Id: 7F00000100002873000000000004F2B4

hello world

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants