# Rabbitmq River via Java API?

**URL:** <https://discuss.elastic.co/t/rabbitmq-river-via-java-api/5907>\
**Category:** Elasticsearch\
**Created:** [November 18, 2011, 5:55am UTC](https://discuss.elastic.co/t/rabbitmq-river-via-java-api/5907 "2011-11-18T05:55:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)\
**Post date:** [November 18, 2011, 5:55am UTC](https://discuss.elastic.co/t/rabbitmq-river-via-java-api/5907/1 "2011-11-18T05:55:52Z")

</div>

Hi

I want to used Rabbitmq river for indexing.i got one thread that  
discuss about using Rabbitmq thread:  
[https://groups.google.com/forum/#!topic/elasticsearch/MNW7Mc1l3vs.after](https://groups.google.com/forum/#!topic/elasticsearch/MNW7Mc1l3vs.after)  
reading this thread i have certain doubt:

1. 

String message = "{ "index" : { "index" : "test", "type" :  
"type1", "id" : "1" }\n" +  
"{ "type1" : { "field1" : "value1" } }  
\n" +  
"{ "delete" : { "index" : "test",  
"type" : "type1", "id" : "2" } }\n" +  
"{ "create" : { "index" : "test",  
"type" : "type1", "id" : "1" }\n" +  
"{ "type1" : { "field1" :  
"value1" } }";

a.) explain the define above message format and what it does and it's  
role on index.  
b.) when i publish this message,where i mention the source data in  
message which i wants to be index.

1. 

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  
}  
}

how to used this curl document in java and which place it can be set  
for provide the custom configuration for Rabbitmq.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:48am UTC](https://discuss.elastic.co/t/rabbitmq-river-via-java-api/5907/2 "2017-07-06T03:48:15Z")

</div>


