Skip to content

Commit

Permalink
Describe Elasticsearch connector configuration in details
Browse files Browse the repository at this point in the history
  • Loading branch information
takezoe authored and ennru committed Nov 12, 2017
1 parent 66a49fd commit 90a1378
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions docs/src/main/paradox/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,26 @@ Java

### Configuration

We can specify the buffer size for the source.
We can configure the source by `ElasticsearchSourceSettings`.

Scala (source)
: @@snip (../../../../elasticsearch/src/main/scala/akka/stream/alpakka/elasticsearch/scaladsl/ElasticsearchSourceSettings.scala) { #source-settings }

Also, we can specify the buffer size, the max retry count and the retry interval for the sink.
| Parameter | Default | Description |
| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------ |
| bufferSize | 10 | `ElasticsearchSource` retrieves messages from Elasticsearch by scroll scan. This buffer size is used as the scroll size. |

Also, we can configure the sink by `ElasticsearchSinkSettings`.

Scala (sink)
: @@snip (../../../../elasticsearch/src/main/scala/akka/stream/alpakka/elasticsearch/scaladsl/ElasticsearchSinkSettings.scala) { #sink-settings }

`ElasticsearchSource` retrieves messages from Elasticsearch by scroll scan. This buffer size is used as the scroll size.
`ElasticsearchSink` puts messages by one bulk request per messages of this buffer size.
| Parameter | Default | Description |
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------ |
| bufferSize | 10 | `ElasticsearchSink` puts messages by one bulk request per messages of this buffer size. |
| retryInterval | 5000 | When a request is failed, `ElasticsearchSink` retries that request after this interval (milliseconds). |
| maxRetry | 100 | `ElasticsearchSink` give up and fails the stage if it gets this number of consective failures. |
| retryPartialFailure | true | A bulk request might fails partially for some reason. If this parameter is true, then `ElasticsearchSink` retries to request these failed messages. Otherwise, failed messages are discarded (or pushed to downstream if you use `ElasticsearchFlow` instead of the sink). |

### Using Elasticsearch as a Flow

Expand Down

0 comments on commit 90a1378

Please sign in to comment.