Thanks for reply.I have used following settings:
Map rabbitmqSettings = new HashMap();
rabbitmqSettings.put("host", "192.168.1.47");
rabbitmqSettings.put("port", 5672);
rabbitmqSettings.put("user", "guest");
rabbitmqSettings.put("pass", "guest");
rabbitmqSettings.put("vhost", "/");
rabbitmqSettings.put("queue", "river");
rabbitmqSettings.put("exchange", "river");
rabbitmqSettings.put("routing_key", "river");
rabbitmqSettings.put("exchange_type", "direct");
rabbitmqSettings.put("exchange_durable", true);
rabbitmqSettings.put("queue_durable", true);
rabbitmqSettings.put("queue_auto_delete", false);
Map indexSettings = new HashMap();
indexSettings.put("bulk_size", 100);
indexSettings.put("bulk_timeout", "10ms");
indexSettings.put("ordered", "false");
client.prepareIndex("_river", "test1",
"_meta").setSource(jsonBuilder().startObject().field("type",
"rabbitmq").field("rabbitmq", rabbitmqSettings).field("index",
indexSettings).endObject()).execute().actionGet();
Is it is correct.here i have assign the host IP address and also
change the queue,exchange and routing key where message publish and ES
read messages and index it.
On Dec 5, 2:11 pm, Damien Hardy damienhardy....@gmail.com wrote:
Hello,
If I understand well, you just have to change the "host" fields to set the
name or IP of the host where is running RabbitMQ
And exchange and queue fields have to be the same than the producer(s) ones
(i.e. : same conf for creation from the both side of the message queue).
Cheers,
--
Damien
2011/12/5 sam mishra.sam...@gmail.com
Hi
For creating the rabbitmq river is as simple as (all configuration
parameters are provided, with default values)
Elasticsearch Platform — Find real-time answers at scale | Elastic but
in my case, I want to use Rabbitmq server which is running on another
machine,so using default configuration it is not possible,i need to
change the host in provided configuration.if it possible then please
help me how to convert curl configuration in form of java code and
which place put this configuration.
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
},
"index" : {
"bulk_size" : 100,
"bulk_timeout" : "10ms",
"ordered" : false
}
}'