Skip to content

Instantly share code, notes, and snippets.

View lukebakken's full-sized avatar

Luke Bakken lukebakken

View GitHub Profile
[
{rabbit, [
{tcp_listeners, [{"127.0.0.1", 1672}]},
{ssl_listeners, [1671]}, % This needs to be unique on each node
{log_levels, [{connection, debug}]},
{heartbeat, 30},
{handshake_timeout, 20000},
{consumer_timeout, 86400000},
{ssl_handshake_timeout, 20000},
{default_vhost, <<"default">>},
@lukebakken
lukebakken / README.md
Last active January 29, 2024 10:32
RabbitMQ / MQTT TCP Tuning

rabbitmq.config

[
    {rabbit, [
        {background_gc_enabled, true},
        {background_gc_target_interval, 60000},
        {tcp_listeners, [5672]},
        {num_tcp_acceptors, 10},
        {connection_max, infinity},
@lukebakken
lukebakken / advanced.config
Last active September 7, 2023 14:49
Verify Riak precommit hook
[
{riak_kv, [
{add_paths, ["/home/lbakken/Projects/customers/riak-users/sanket-agrawal/"]}
]}
].

main

C:\Users\bakkenl\rmq-server\rabbitmq_server-main
> Measure-Command { .\sbin\rabbitmqctl.bat import_definitions C:\Users\bakkenl\development\rabbitmq\sample-configs\queues\100k-classic-queues.json }

Days              : 0
Hours             : 0
Minutes           : 3
Seconds           : 55

Hello -

Thanks for using RabbitMQ. I'm a member of the core engineering team.

Carefully look at the first 16 octets in this error log message:

2023-02-26 16:43:12.635470+00:00 [error] <0.1056.0>  operation none caused a connection exception frame_error: "type 3, first 16 octets = <<\"{\\\"payload\\\":{\\\"res\">>: {invalid_frame_end_marker,\n                                                      
99}"
2023-02-26 16:43:15.638860+00:00 [error] &lt;0.1056.0&gt; closing AMQP connection &lt;0.1056.0&gt; (10.244.0.18:60608 -&gt; 10.244.0.21:5672):
@lukebakken
lukebakken / FOOTER.md
Last active February 26, 2023 23:21
StackOverflow Answer footer
@lukebakken
lukebakken / riak-2-certificate-notes.md
Last active July 5, 2022 13:54
Riak 2 / PAM / Certificates

Testing Notes

At this time only the protocol buffers client supports client certificates. HTTP is not supported.

Setup

Setting up a Root CA

It is necessary to set up a Root Certificate authority to be able to create and sign certificates.

@lukebakken
lukebakken / rmq-passwd-gen
Last active June 20, 2022 02:54
RabbitMQ - Create Hashed User Password
#!/usr/bin/env bash
set -o errexit
set -o nounset
declare -r passwd="${1:-newpassword}"
declare -r tmp0="$(mktemp)"
declare -r tmp1="$(mktemp)"
"""Basic message consumer example"""
import functools
import logging
import pika
LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) '
'-35s %(lineno) -5d: %(message)s')
LOGGER = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT)
@lukebakken
lukebakken / RabbitMQ-Clients.md
Last active January 5, 2022 23:46
Cllient library overview 2022-01

AMQP

Feature list

  • Low vs high-level
  • TLS support
  • Stats / Metrics / Monitoring (S)
  • Auto-reconnect (R)
  • Topology recovery (TR)