Skip to content

Instantly share code, notes, and snippets.

View Zerpet's full-sized avatar
🏠
Working from home

Aitor Pérez Cedres Zerpet

🏠
Working from home
View GitHub Profile
@Zerpet
Zerpet / benchmark_test.go
Created June 20, 2023 10:55
Benchmark: buffered deliveries channel batching vs un-buffered deliveries channel batching
//+go:build integration
package amqp091_test
import (
"context"
"fmt"
amqp "github.com/rabbitmq/amqp091-go"
"os"
"strconv"
@Zerpet
Zerpet / one-node.rb
Last active November 12, 2020 18:03
oneGB = 1 * 1000 * 1000 # in KB
$testbed = Proc.new do
{
"name" => "testbed",
"version" => 3,
"esx" => (0..0).map do | idx |
{
"name" => "esx.#{idx}",
"vc" => "vc.0",
@Zerpet
Zerpet / rabbit.yml
Last active August 27, 2020 09:35
Wavefront Proxy + Telegraf Agent + RabbitMQ
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
annotations:
prometheus.io/port: "15692"
prometheus.io/scrape: "true"
name: bunny
spec:
image: rabbitmq:3.8
replicas: 3
@Zerpet
Zerpet / deployment.yaml
Last active March 8, 2024 09:55
RabbitMQ Perf Test deployment in Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: perf-test-deployment
labels:
app: perf-test
spec:
replicas: 1
selector:
matchLabels:
@Zerpet
Zerpet / definition.json
Created June 28, 2018 15:16
RabbitMQ definition to example message TTL and DLX
{
"bindings": [
{
"arguments": {},
"destination": "dead",
"destination_type": "queue",
"routing_key": "",
"source": "dlx",
"vhost": "/"
},
@Zerpet
Zerpet / create-ca.sh
Last active July 5, 2018 14:01
TLS Setup for RabbitMQ
#!/bin/bash
mkdir -pv testca
cd testca
mkdir -pv certs private
chmod 700 private
echo 01 > serial
touch index.txt
openssl req -x509 -config ../openssl.cnf -newkey rsa:2048 -days 365 -out cacert.pem -outform PEM -subj /CN=MyTestCA/ -nodes
@Zerpet
Zerpet / Steps explanation.md
Created April 6, 2018 10:14
How to get a cluster of RabbitMQ using Docker

What just happened?

  • We used curl to download a Docker Compose template for RabbitMQ 3.6 from the image repo
  • We started a new Docker Compose "project" named blazing-fast-rabbit using the template
  • The Docker image has an automated procedure in the entry script to automatically join a RabbiMQ cluster
  • The management UI ports are exposed and forwarded to localhost ports 15672, 15673 and 15674
  • We can get an interactive Bash terminal to the container
  • We can execute any command in the container without an interactive terminal!
  • We left everything as we found it
@Zerpet
Zerpet / keybase.md
Created September 7, 2016 12:54
Prove my GitHub identity

Keybase proof

I hereby claim:

  • I am Zerpet on github.
  • I am zerpet (https://keybase.io/zerpet) on keybase.
  • I have a public key whose fingerprint is 2C8F CD9C A8D5 1A8F 89DE D4E7 0E97 3277 AB13 2628

To claim this, I am signing this object: