Sha256: 16a2e6b220c91eb1416d4fc1eab5e0c07f91d18fc5aafdf051d31dc72c54340b

Contents?: true

Size: 1.11 KB

Versions: 3

Compression:

Stored size: 1.11 KB

Contents

Logstash Avro Codec
===================

How to Install
--------------

```
bin/plugin install logstash-avro-codec
```

How to Use
----------
You can use this codec to decode avro messages
in a Kafka topic input.

Here is an example schema for tweets.

### tweet.avsc
```
{
  "type" : "record",
  "name" : "twitter_schema",
  "namespace" : "com.miguno.avro",
  "fields" : [ {
    "name" : "username",
    "type" : "string",
    "doc" : "Name of the user account on Twitter.com"
  }, {
    "name" : "tweet",
    "type" : "string",
    "doc" : "The content of the user's Twitter message"
  }, {
    "name" : "timestamp",
    "type" : "long",
    "doc" : "Unix epoch time in seconds"
  } ],
  "doc:" : "A basic schema for storing Twitter messages"
}
```

Along with the logstash config for reading in messages of this 
type using the avro codec with the logstash-input-kafka plugin.

### logstash.conf

```
input {
  kafka {
    topic_id => 'test_topic'
      codec => avro {
        schema_file => 'tweet.avsc'
      }
  }
}

output {
  stdout {
    codec => rubydebug
  }
}
```

### Running the setup
```
bin/logstash -f logstash.conf
```

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
logstash-codec-avro-0.1.2 DEVELOPER.md
logstash-codec-avro-0.1.1 DEVELOPER.md
logstash-codec-avro-0.1.0 README.md