[API] POST Topic

This commit is contained in:
Oleg Shuralev 2020-01-17 23:06:48 +03:00
parent e24423e613
commit ee92f4482f
No known key found for this signature in database
GPG key ID: 0459DF80E1A2FD1B

View file

@ -14,6 +14,23 @@ module.exports = function (fastify, opts, next) {
})
.get('/clusters/:clusterId/topics/:topicId/config', function (request, reply) {
reply.send(topicConfig);
})
.post('/clusters/:clusterId/topics', function (request, reply) {
/* Payload
{
"name":"AlphaNumeric-String_with,and.",
"partitions":"1",
"replicationFactor":"1",
"configs": {
"retention.ms": "604800000",
"retention.bytes": "-1",
"max.message.bytes":"1000012",
"min.insync.replicas":"1"
}
}
*/
reply.code(201).send();
});
next();