bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
// The Kafka documentation makes it very confusing to set up plain text SASL authentication while also using TLS / SSL. | |
// MAKE SURE THE KEYSTORE YOU ARE USING ON THE KAFKA CLUSTER IS BUILT WITH RSA ALGO, OTHERWISE GO CAN'T TALK TO JAVA OVER TLS / SSL | |
package main | |
import ( | |
"crypto/tls" | |
"fmt" | |
"github.com/Shopify/sarama" | |
) |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
# clean everything up | |
echo "killing mongod and mongos" | |
killall mongod | |
killall mongos | |
echo "removing data files" | |
rm -rf data/config | |
rm -rf data/shard* | |
# For mac make sure rlimits are high enough to open all necessary connections | |
ulimit -n 2048 |
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |