Hello,
I join a patch to my mail to make HA Queue on RabbitMQ available for
Elasticsearch.
http://www.elasticsearch.org/guide/reference/river/rabbitmq.html
Based on the new repo
https://github.com/elasticsearch/elasticsearch-river-rabbitmq (congrats for
the good job Shay
Reading this : http://www.rabbitmq.com/ha.html *
-
*/!\* big warn only "x-ha-policy" : "all" is fonctionnal */!\*
see
http://old.nabble.com/HA-queue-seems-never-to-get-fully-created-td32529015.html#a32582000
Config for HA Queue should be :
curl -XPUT 'localhost:9200/_river/my_river/_meta' -d '{
"type" : "rabbitmq",
"rabbitmq" : {
"host" : "localhost",
"port" : 5672,
"user" : "guest",
"pass" : "guest",
"vhost" : "/",
"queue" : "elasticsearch",
"exchange" : "elasticsearch",
"routing_key" : "elasticsearch",
"exchange_type" : "direct",
"exchange_durable" : true,
"queue_durable" : true,
"queue_auto_delete" : false,
"args" : { "x-ha-policy" : "all" }
},
"index" : {
"bulk_size" : 100,
"bulk_timeout" : "10ms",
"ordered" : false
}
}
And should support future "x-ha-policy" : "nodes" (when bug will be closed
on RabbitMQ) with :
curl -XPUT 'localhost:9200/_river/my_river/_meta' -d '{
"type" : "rabbitmq",
"rabbitmq" : {
"host" : "localhost",
"port" : 5672,
"user" : "guest",
"pass" : "guest",
"vhost" : "/",
"queue" : "elasticsearch",
"exchange" : "elasticsearch",
"routing_key" : "elasticsearch",
"exchange_type" : "direct",
"exchange_durable" : true,
"queue_durable" : true,
"queue_auto_delete" : false,
"args" : {
"x-ha-policy" : "nodes",
"x-ha-policy-params" : [ "rabbit1@localhost",
"rabbit2@localhost" ]
}
},
"index" : {
"bulk_size" : 100,
"bulk_timeout" : "10ms",
"ordered" : false
}
}
Cheers,
--
Damien