npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@aligent/cdk-rabbitmq

v0.1.0

Published

## Overview This repository defines a CDK construct for hosting a RabbitMQ cluster within AWS. It can be imported and used within CDK applications.

Downloads

2

Readme

Aligent AWS RabbitMQ

Overview

This repository defines a CDK construct for hosting a RabbitMQ cluster within AWS. It can be imported and used within CDK applications.

Example

The following CDK snippet can be used to provision the static hosting stack.

import 'source-map-support/register';
import * as cdk from '@aws-cdk/core';
import { RabbitMq } from '@aligent/cdk-rabbitmq'
import { Construct } from '@aws-cdk/core';

const mqStackProps = {
    env: {
        region: 'ap-southeast-2',
        account: 'account-id-goes-here',
    },
    rabbitMQProps: {
       autoMinorVersionUpgrade: true,
       brokerName: 'brokerName',
       deploymentMode: 'SINGLE_INSTANCE',
       engineType: 'RABBITMQ',
       engineVersion: '3.8.6',
       hostInstanceType: 'mq.t3.micro',
       publiclyAccessible: false,
       users: [{
            username: 'username',
            password: 'password'
       }],
       logs: { general: true },
       maintenanceWindowStartTime: {
            dayOfWeek: 'Sunday',
            timeOfDay: '00:00',
            timeZone: 'Australia/Sydney'
       },
    },
    applicationVpcId: string;
    applicationSecurityGroupId: string;
};

const app = new cdk.App();
class RabbitMQStack extends Stack {
  constructor(scope: Construct, id: string, props: hostingStackProps) {
    super(scope, id, props);

    new RabbitMQ(scope, 'rabbitmq', props.rabbitMQProps);
  }
}

new RabbitMQStack(scope, 'rabbit-mq-stack', mqStackProps);

Connection and communication

Applications talk to RabbitMQ via amqps protocol(5671/tcp). For visual management, use SSH tunneling.

  1. Add the below in your local ~/.ssh/config file with profile and path updated (works only for SSM-enabled environments):

     host i-*
         User ec2-user
         ProxyCommand sh -c "aws --profile <TargetAccountProfile> ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
         IdentityFile /path/to/ssh_key/for/backend_instance
  2. Find RabbitMQ endpoint hostname and the application BE instance ID to run this command that will open a ssh connection (not an interactive shell with the -N flag):

     ssh -N -L <random_local_port>:<RabbitMQ_endpoint>:443 <BEInstanceID>

    for example,

     ssh -L 56710:b-abcd-ef12-3456-7890-abcdef123456.mq.ap-southeast-2.amazonaws.com:443 i-abcdef1234567890
  3. Open your web browser to access to the GUI (get id/pw from environments.ts)

     https://localhost:<random_local_port_from_above>

    for example,

     https://localhost:56710

Local development

NPM link can be used to develop the module locally.

  1. Pull this repository locally
  2. cd into this repository
  3. run npm link
  4. cd into the downstream repo (target project, etc) and run npm link 'aws-rabbitmq-stack' The downstream repository should now include a symlink to this module. Allowing local changes to be tested before pushing.