emqx/apps
Zaiming (Stone) Shi d1332b72e7 feat(api/publish): return detailed publish results
Prior to this change, the publish API returns 200 in most of
the cases.
This change provides more insights to the publish result.

For single message publish endpoint (`publish/`):

HTTP error codes are:

200: Everything is OK
202: No subscriber for the topic
400: When mesage is invalid message.
     e.g. bad topic name or QoS out of range.
503: Failed to dispatch the message. e.g. during EMQX restart.

The response body is a JSON object with two fields
`message_id`, and `publish_result`.
The `message_id` is a globally unique ID for tracing.
`publish_result` is `"OK"` when the message is delivered
to at least one subscriber.
Otherwise `"no_subscriber"`.
`publish_result` may also be some other informative
message to hint the failure result, the content of which
may change in the future.

For `publish/bulk` endpoint:

200: When all message in the bulk are published OK
202: If at least one message in the bulk had `"no_subscriber"` result
400: When mesage is invalid message. e.g. bad topic name or
     QoS out of range.
503: When there is at least one message failed at dispatch.

The reply body is a list of JSON objects having the same layout
as for hte `publish` endpoint.
2022-10-20 20:03:27 +02:00
..
emqx feat(api/publish): return detailed publish results 2022-10-20 20:03:27 +02:00
emqx_authn chore(i18n): correct tags name 2022-09-30 23:14:19 +08:00
emqx_authz chore: apps vsn bump 2022-09-23 17:09:15 +08:00
emqx_auto_subscribe chore: update app.src 2022-09-30 23:32:23 +08:00
emqx_bridge fix(bridge/authz/exhook): no need to drop invalid certs 2022-09-14 14:08:55 +08:00
emqx_conf chore: apps vsn bump 2022-09-23 17:09:15 +08:00
emqx_connector chore: update app.src 2022-09-27 17:24:44 +08:00
emqx_dashboard Merge pull request #9082 from HJianBo/update-api-docs 2022-10-12 09:36:11 +08:00
emqx_exhook chore: update app.src 2022-09-30 23:32:23 +08:00
emqx_gateway chore(i18n): correct tags name 2022-09-30 23:14:19 +08:00
emqx_machine fix: dialyzer never match warning 2022-06-07 10:47:40 +08:00
emqx_management feat(api/publish): return detailed publish results 2022-10-20 20:03:27 +02:00
emqx_modules chore: bump emqx_modules && update CHANGES 2022-09-27 13:39:25 +08:00
emqx_plugin_libs chore: support strip double quote in authn/authz 2022-09-14 15:25:31 +08:00
emqx_plugins fix: plugin_test failed 2022-06-17 12:09:18 +08:00
emqx_prometheus chore: delete hocon from emqx_prometheus application deps 2022-08-09 20:19:31 +02:00
emqx_psk refactor(psk): Export transactions 2022-08-22 19:52:37 +02:00
emqx_resource chore: using standard log format 2022-07-01 12:06:35 +08:00
emqx_retainer test(retainer): add test case for start after retianer is disabled 2022-09-09 10:46:42 +08:00
emqx_rule_engine feat(rule engine jq function): config for changing implementation 2022-09-22 09:02:30 +02:00
emqx_slow_subs chore(swagger): caption tags name 2022-09-30 23:04:26 +08:00
emqx_statsd chore(i18n): fix the bad desc for statsd 2022-09-30 18:57:08 +08:00