krakend 消费amqp mq 消息
krakend 支持amqp mq 的消息消费以及发送,可以实现(http2xxx)
具体的参数配置可以参考官方文档
消费消息参考配置
"backend": [
{
"host": [
"amqp://guest:guest@myqueue.host.com:5672"
],
"disable_host_sanitize": true,
"extra_config": {
"github.com/devopsfaith/krakend-amqp/consume": {
"name": "queue-1",
"exchange": "some-exchange",
"durable": true,
"delete": false,
"exclusive": false,
"no_wait": true,
"no_local": false,
"routing_key": ["#"],
"prefetch_count": 10
}
}
}
发布消息
"endpoint": "/producer",
"headers_to_pass": [ "...", "..." ],
"backend": [
{
"host": [
"amqp://guest:guest@myqueue.host.com:5672"
],
"disable_host_sanitize": true,
"extra_config": {
"github.com/devopsfaith/krakend-amqp/produce": {
"name": "queue-1",
"exchange": "some-exchange",
"durable": true,
"delete": false,
"exclusive": false,
"no_wait": true,
"mandatory": true,
"immediate": false
}
}
}